See if you can give a solution

Правка en4, от najmul.csebuet, 2020-11-11 16:19:33

I am trying to solve following problem.

https://open.kattis.com/problems/uprooted

I am attaching as pdf also.

Any hint and more better a solution is appreciated. I am trying a lot but not solved yet.

My Code

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en6 Английский najmul.csebuet 2020-11-11 21:49:43 7935
en5 Английский najmul.csebuet 2020-11-11 16:22:57 51
en4 Английский najmul.csebuet 2020-11-11 16:19:33 81
en3 Английский najmul.csebuet 2020-11-11 16:05:23 0 (published)
en2 Английский najmul.csebuet 2020-11-11 16:04:11 4 (saved to drafts)
en1 Английский najmul.csebuet 2020-11-11 16:00:44 6154 Initial revision (published)