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

Автор kritinsharma, история, 4 года назад, По-английски

My solution for the problem 1393B - Applejack and Storages of the contest Codeforces Round 662 (Div. 2) failed the main tests so I was looking for the correct solution in other participants' code and found an incorrect submission that passed the main tests.
Submission : 89237180
This solution fails for the test case
5
1 1 1 1 1
1
+ 1
The output should be NO but the code outputs YES. This means many incorrect submissions might have been accepted. I kindly request Codeforces people and AlFlen to look into the matter.

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

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

Yup, I verified on my local machine. This code actually outputs YES.

AlFlen Can you please have a look at this.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +25 Проголосовать: не нравится

I did the tests for problem B. I can see the issue in the code but the tests could not take it into consideration. Many tests with 7 equal elements were created with the answer was "NO". There were tests where there was no planks left, but there was no test for such a submission. I couldn't take all the variants into consideration. I doubt many solution will fail because of that test.

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

    Sorry but the submission also fails in the case of 7 identical elements. For example consider the following test case :
    6
    1 1 1 1 1 1
    1
    +1
    I assume you meant this type of cases. But this also outputs YES instead of NO.

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

      I did not consider several cases in one test. Thus, case with only one plank length was not considered with 7 planks of one length. No tests like these were created.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +66 Проголосовать: не нравится

It's good to have weak pretests once in a while. Reminds us that the hacking feature exists, and can be used during the round in Div1 and Div2 contests. Also reminds us that authors are real people too, and for certain problems, it's unfeasible to expect them cover everything that 16,000+ contestants can come up with.

Edit: The relevance might be not obvious. Here it is: when there are more cases of weak pretests recently, more people try hacking others in the next contest. As successful challenges are added to the main test set, having more eyes on hacking B during this contest might have helped catch this wrong solution during the main testing phase. Despite the fact that the authors' tests didn't cover it.

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

WhatsApp-Image-2020-08-08-at-2.44.15-AM.jpg