Marco_L_T's blog

By Marco_L_T, history, 3 years ago, In English,

I wrote the following code for Div.1 C in tonight's contest in practice,which is just a simple mountain-climbing like strategy.

My submission

It's obviously not the intended solution of the problem.However,it passed all the tests,which was to my surprise.So,can anyone please provide some data that can hack my submission?Thank you!

 
 
 
 
  • Vote: I like it
  • +36
  • Vote: I do not like it

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

Hacking data found!

Huge thanks to moejy0viiiiiv for providing the following data that made my code produce a wrong answer: 2 0 1111111 2222222,the answer is certainly 1111111,but my code didn't give the answer.So the shortest accepted code of the problem written by me is fake.

UPD:Admin,could you please add this data to the dataset?

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

    1  ≤  k  ≤  1011, so your test seems to be incorrect.

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

      Oops,my fault…… However,if we change the previous data slightly to 2 1 1111111 2222221,my code still produces wrong answer,and in this case the data satisfy all the conditions. And could you please add this data to the dataset? Thanks a lot!