2008年8月6日星期三

ZJU/ZOJ 1880 Tug of War 解题报告

题目大意是将给出的n个数分成两堆,使两堆的差尽可能下,且两堆的数的个数不能相差超过1。

一开始是想用f[i,j]表示前i个数中取j个与sum/2的差值最小的值来DP,但发现这是有后效性的,无奈之下只好用了做n次0/1背包的方法来得到在n个数中取n/2个的可能取值,与sum/2最接近的可能值即为所求。

3025033 2008-08-06 18:29:30 Accepted 1880 FPC 00:02.57 2652K IwfWcf@LZOI

7 条评论:

  1. abercrombie and fitch, http://www.abercrombie-fitch.us.com/
    cheap jordans, http://www.cheapjordanshoes.in.net/
    cheap wedding dresses, http://www.cheap-weddingdresses.net/
    oakley sunglasses, http://www.oakleysunglassescanada.com/
    nike mercurial, http://www.nikemercurial.org/
    michael kors outlet, http://www.michaelkorsoutletonlinstore.us.com/
    ray ban sunglasses, http://www.raybansunglassesonline.us.com/
    prada shoes, http://www.pradashoes.us/
    moncler coats, http://www.moncler.us.com/
    oakley sunglasses, http://www.wholesaleoakleysunglasses.us.com/
    lacoste polo shirts, http://www.lacostepoloshirts.cc/
    cheap oakley sunglasses, http://www.cheapoakleysunglassess.us.com/
    adidas outlet store, http://www.adidasoutletstore.us.com/
    north face outlet, http://www.thenorthface.me/
    gucci, http://www.borseguccioutlet.it/
    ugg outlet, http://www.uggsoutlet.us.org/
    mulberry outlet, http://mulberryoutlet.outlet-store.co.uk/
    ray ban sunglasses, http://www.rayban-sunglassess.us.com/
    canada goose outlet, http://www.canadagoose.us.org/
    futbol baratas, http://www.futbol-baratas.com/
    kobe bryant shoes, http://www.kobebryantshoes.in.net/
    cheap mlb jerseys, http://www.cheapmlbjerseys.net/
    timberland boots, http://www.timberlandboots.name/
    cheap nfl jerseys, http://www.cheapnfljerseys.org/
    longchamp handbags, http://www.longchamphandbag.us.com/
    michael kors outlet, http://www.michaelkorsoutletcanada.in.net/
    montblanc pens, http://www.montblanc-pens.com.co/
    coach outlet store, http://www.coach-outlet-store.us.com/
    1003maoqiuyun

    回复删除

 
Creative Commons License
除非另有声明,本网站采用知识共享署名-非商业性使用-相同方式共享 3.0 许可协议授权。