Блог пользователя Marco_L_T

Автор Marco_L_T, история, 7 лет назад, По-английски

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!

  • Проголосовать: нравится
  • +36
  • Проголосовать: не нравится

»
7 лет назад, # |
  Проголосовать: нравится +20 Проголосовать: не нравится

Hacking data found!

Huge thanks to jqdai0815 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?

  • »
    »
    7 лет назад, # ^ |
      Проголосовать: нравится +41 Проголосовать: не нравится

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

    • »
      »
      »
      7 лет назад, # ^ |
      Rev. 3   Проголосовать: нравится +31 Проголосовать: не нравится

      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!