No, that doesn't work
網頁
Home
Friday, 6 August 2010
IOI 2004 Farmer
一開始以為係 knapsack, 後來又發現可以分開拎
睇明題目後做法很簡單, 如果樹圈的數目 >= 可以拎的, 咁就睇下砌唔砌到剛剛好N (即答案是N或N-1)
如果唔夠, 就對餘下的線樹繼續做 knapsack..
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment