Rosetta Problems

Atcoder Educational DP Contest G - Longest Path

https://oj.vnoi.info/problem/atcoder_dp_g