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

Автор ganesh_6, история, 3 года назад, По-английски

I am solving the problem https://mirror.codeforces.com/problemset/problem/1033/C. I could not get the editorial and found the comment https://mirror.codeforces.com/blog/entry/62287?#comment-462858 useful. I have implemented the solution as per the comment, but it is giving WA

WA
AC

My doubt is that why can't we do like WA and why should we loop using elements instead of indexes?

Please explain why the earlier approach is giving WA and not later.

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