Can someone teach me how to do this qn? I tried finding the announcement blog, but there wasn't any solutions posted about this qn and google translating the official editorial didn't work well enug for me to understand.
https://oj.uz/problem/view/JOI18_wild_boar
Thanks in advance!