p_321052's blog

By p_321052, history, 2 years ago, In English

i'm solving this problem : https://mirror.codeforces.com/contest/1280/problem/D and my code : https://mirror.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

»
2 years 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.