Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

can someone help me correcting my code?

Правка en1, от p_321052, 2022-07-12 10:22:18

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

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский p_321052 2022-07-12 10:22:18 471 Initial revision (published)