why my code works?

Правка en1, от p_321052, 2022-05-30 01:22:37

this problem : https://codeforces.me/contest/1369/problem/D

my code : https://codeforces.me/contest/1369/submission/158768076

dp[i][j] = maximum number of yellow nodes of tree of level i. if j = 0, it's root is not colored. otherwise it's root is colored.

well, it seems reasonable but since it returns maximum value modulo 1e9+7, we can't tell which value is actually bigger one.

but my code passed. why does it work? or is it because of weak test data?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский p_321052 2022-05-30 01:22:37 494 Initial revision (published)