p_321052's blog

By p_321052, history, 22 months ago, In English

i'm solving this problem : https://codeforces.com/contest/1280/problem/D and my code : https://codeforces.com/contest/1280/submission/163753815

i thought this is just tree knapsack dp but for some reason, get's wrong answer for test3

dp[i][j] means (maximum number of winning region, maximum advantage of component involving i) when partitioning subtree of i into j regions

can someone tell me what's wrong with my code?

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
22 months ago, # |
  Vote: I like it +28 Vote: I do not like it

Take a look at Ticket 15647 from CF Stress for a counter example.