题目大意是将给出的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
题目大意是将给出的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
qihang0922,kevin durant shoes
回复删除chaussure louboutin
hollister
ed hardy clothing
basketball shoes
longchamp outlet
longchamp
nike free run
swarov ski jewelry
nike air max
mcm handbags
toms outlet
nike sb
uggs boots on sale
ray ban sunglasses
nike free runs
polo outlet
nike huarache
nike air max 90
tods outlet
abercrombie and fitch
supra shoes
instyler curling iron
nike cortez
christian louboutin shoes
mcm outlet
louis vuitton borse
kate spade uk
gucci outlet
canada goose outlet
instyler max
tory burch outlet
ralph lauren outlet
gucci borse
jordan pas cher
ugg boots
longchamp handbags
air max
q
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
coach factory outlet
回复删除christian louboutin heels
michael kors outlet online
prada handbags
tiffany and co
coach factory outlet
canada goose sale
abercrombie and fitch
coach outlet store online clearances
ugg slippers
201612.26chenjinyan
coach factory outlet
回复删除air jordan uk
tommy hilfiger
adidas yeezy
ugg sale
cheap nhl jerseys
birkenstock sandals
michael kors outlet online
nike store
kd 9 shoes
20170112caiyan
toms shoes
回复删除cheap basketball shoes
nike blazer
michael kors handbags
michael kors outlet
jordan 4
oakley sunglasses
ray ban sunglasses
rolex replica
versace jeans
ferragamo outlet
回复删除discount oakley sunglasses
coach outlet online
cheap ray ban sunglasses
snapbacks wholesale
polo ralph lauren
fitflops sale
prada shoes
hermes
回复删除balenciaga sneakers
chrome hearts online store
stephen curry shoes
balenciaga
kyrie 5 shoes
supreme t shirt
coach handbags
fila
longchamp