Hi, I cant understand, why my solution to problem 1137C. Museums Tour is getting WA79. Testcase is large, I tried to found by brute force on small graphs for n <= 4 and d <= 4 and compare with other accepted solutions and did not found counter-test. Can anybody help with understanding why my solution got WA79?
UPD. Fixed. Looks like we can't use dynamic programming on topological order, where we will update dp like: dp[next] = std::max(dp[next], dp[curr] + value[next])
for all edges curr->next
, we only allowed use dynamic programming like dp[curr] = std::max(dp[curr], dp[prev]+value[curr])
for all edges prev->curr
. Accepted try, difference with wa79.