Link to the problem : https://www.codechef.com/APRIL20B/problems/FCTRE
I applied MO's algorithm on trees but it gives TLE.
How to solve this problem ?
Link to the problem : https://www.codechef.com/APRIL20B/problems/FCTRE
I applied MO's algorithm on trees but it gives TLE.