pinku22's blog

By pinku22, history, 8 years ago, In English

I need help with this problem, tutorial making little to no sense to me, in most of the solutions they have used the disjoint set union way in which merging is done with some calculation which even when tried with many examples is not making complete sense to me.

question link: http://codeforces.me/contest/452/problem/E

Solution link: http://codeforces.me/contest/452/submission/7801672

  • Vote: I like it
  • +11
  • Vote: I do not like it