ghostr304's blog

By ghostr304, 9 years ago, In English

In Codeforces Round #304 , there is a bug occurred during the contest.

When i was hacking i found someone had wrong solution in problem B so i tried to hack him with this test case:
3
1 1 1
and then it was showing "invalid input"
then i tried again with different cases (similar idea) and keep telling me "invalid input"

Then later on i found someone hacking him/her with the same test case and it showed "Successful hacking attempt" ?!

My hacking attempt was with id 153991 at 2015-05-22 21:08:51 on eknoor292 solution
swust_20131737 hacking attempt with id 154761 at 2015-05-22 21:28:05 with the same test case on the same person

I don't care about this contest but i am afraid that it may happen again so please someone from technical team respond to it
This bug caused me to stop hacking attempts as i thought i misunderstood the problem and consumed me time also by reading the problem many times

Thank you very much for the attention :D

UPD: maybe because i didn't print \n character as explained in comments :D

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

»
9 years ago, # |
  Vote: I like it +4 Vote: I do not like it

Only noticeable difference between two hacks is that there is \n character after swust_20131737's hack, which is probably the problem. Pressing enter key after the last character will probably allow it, the Successful Hacking Attempt. But I never seen this issue bring up before, so may be some differences in problem setter's checker code for this round.

(BTW, how you see \n character, is done by going to the 2 submissions, and double clicking the text (to "highlight" it))

153991: Image 154761: Image

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Oops!

    Thank you very much for this explanation

    I am upset because this prevented me from many hacks but thank you i will learn from this mistake in the next times :D

    But the weird thing that i never putted \n in the last line in hacking test cases but it maybe as you explained "bec some differences in problem setter's checker code for this round."

»
9 years ago, # |
  Vote: I like it +3 Vote: I do not like it

You need to add newline at the end. Your input should be: "3\n1 1 1\n". Every input case in the problems of Codeforces competitions has trailing newline, but it is not shown.