When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

ISMAIL_HOSSAIN's blog

By ISMAIL_HOSSAIN, history, 7 years ago, In English

Click Here i have tried 2 days but i didn't find any solution.i seached in google i found some solution but i couldn't understand of those code. i know LCA,HLD,dfs,segmeent tree.And solved some problem in differnt Oj. So, anyone can help me by sharing an idea how can i solve this problem.And also how can i implement this.

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

It is about Mo's algorithm on trees. http://codeforces.com/blog/entry/43230