https://usaco.guide/solutions/cses-2080?lang=cpp
The solutions such as written on this page doesn’t work when I tried to submit exactly the same.
(I have also submitted firstly my own solution. Both solutions get core dump / stack overflow.)
Could you please check if the provided solution is working ?
Furthermore, it seems that the second solution on the same page gets wrong answer.
Thanks a lot !