ganesh_6's blog

By ganesh_6, history, 3 years ago, In English

I am solving the problem https://codeforces.me/problemset/problem/1033/C. I could not get the editorial and found the comment https://codeforces.me/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.

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