How to solve this problem ?

Revision en1, by goofg671, 2020-04-15 07:47:44

Link to the problem : https://www.codechef.com/APRIL20B/problems/FCTRE

I applied MO's algorithm on trees but it gives TLE.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English goofg671 2020-04-15 07:47:44 155 Initial revision (published)