JaRoD's blog

By JaRoD, 5 years ago, In English

https://codeforces.me/contest/1633/submission/145991004 When I submit my file codeforces says "wrong answer 18th numbers differ — expected: '1', found: '0'" in test 2, but the code works fine in my computer. If anyone can help I would appreciate it.

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

»
5 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

18-th test is 1100 ($$$cnt_0 = cnt_1$$$).

Your program prints 0 (if (zeros == ones) amount[i] = 0;), but the answer is 1. Why?

It is all because we can choose $$$[l; r]$$$ for deleting $$$l$$$ = 0, $$$r$$$ = 2. 110, we delete one zero.