Блог пользователя goyalnikhil064

Автор goyalnikhil064, история, 4 года назад, По-английски
There is this problem https://www.codechef.com/problems/GERALD07. I tried solving it using Mo algorithm but I am stuck with the dsu. Like when I am going to move left pointer rightwards or right pointer leftwards, then I would need to break the set previously merged. I am not getting how to break the joined set. Plus I know it can be solved by link-cut, but I haven't read that topic so kindly give me suggestions with regard to Mo algorithm. Thanks!

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится