shivam_360's blog

By shivam_360, history, 2 years ago, In English

can anyone explain this why https://mirror.codeforces.com/contest/18/submission/172558206 this solution gets accepted while https://mirror.codeforces.com/contest/18/submission/172557506 this is giving wrong answer for problem https://mirror.codeforces.com/contest/18/problem/C

Isn't both the same thing??

  • Vote: I like it
  • -17
  • Vote: I do not like it

| Write comment?
»
2 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Oh, finally.

The problem is in this line:

Spoiler

I think this test case will help you understand:

test case
  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    oh...great observation... thanks, man!! I will remember this in the future...