|
|
back to boardShow all messages Hide all messagesHint coolboy19521 7 Aug 2024 16:16 Most probably could be solved with centroid decomposition (didn't think much but have some ideas). But my solution is with tree dp with top to bottom dfs and bottom to top dfs. Some call is "rerooting". |
|
|