kritin19's blog

By kritin19, history, 7 weeks ago, In English

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.

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

»
7 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it

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

AlFlen Can you please have a look at this.

»
7 weeks ago, # |
Rev. 2   Vote: I like it +25 Vote: I do not like it

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.

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it +7 Vote: I do not like it

    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.

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it +8 Vote: I do not like it

      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.

      • »
        »
        »
        »
        7 weeks ago, # ^ |
          Vote: I like it +7 Vote: I do not like it

        So is there any chance that new tests will be added? If yes, will the standings be affected by them?

»
7 weeks ago, # |
Rev. 2   Vote: I like it +66 Vote: I do not like it

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.

»
7 weeks ago, # |
  Vote: I like it +57 Vote: I do not like it

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