MathCrusader's blog

By MathCrusader, history, 8 years ago, In English

I am a coach of my programming team, and I'm just starting to use Polygon and have a couple questions.

  • In ICPC-style events, when your solution is wrong, you will receive the result of "Wrong Answer", "Time Limit Exceeded", etc. However, on CodeForces (even on ICPC-style contests), it tells you "Wrong answer on test 5". I want to hide the test case from the contestants to more closely represent an ICPC contest. Is there any way to prevent this information from appearing? (for example, in the Gym or in contests that I make for our Group?).

If you wonder why this is important, consider these two cases: you submit a problem and get "Wrong answer on test 5", then you find a bug and submit again and now get "Wrong answer on test 6". This means that the team knows that they fixed something in their submission, but they would not know in an ICPC contest. This can dramatically alter the way that teams debug their code. They may also get "Wrong answer on test 84", which may tell them that their solution is mostly right, but they are missing a corner case (which is, in my opinion, giving them way too much information).

  • In Polygon, is there a way to generate your output files from a program that is not marked as "Main correct solution"? This normally isn't desirable, but for me (being as picky as I am), I would like to avoid the situations where my judging program outputs 0.4000000012 instead of 0.4000000000. You may wonder, "Does this really matter?" Probably not, but it does cause an issue where the following results will give Wrong Answer instead of Accepted: 0.399999000 with an epsilon of 10 - 6. You also get an issue where 0.4000010010 gets Accepted but should get Wrong Answer. So if we used a program which computed the solution with lots of extra digits of precision (e.g., uses BigDecimal), I would be more confident that the answer will be correct (but this program could easily give Time Limit Exceeded, so it shouldn't be the "Main correct solution").

Thank you in advance for the help!

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

»
8 years ago, # |
Rev. 3   Vote: I like it +11 Vote: I do not like it

for the first part, you can put all test cases in one input file and they will always receive WA on test 1

for the second part, put both solutions in one source code and make something like:

if(test case is small){
     solve_bruteforce();
}   else {
    solve_efficient();
}
  • »
    »
    8 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    For the first part, I can definitely change the problems to have multiple test cases per file for when I create the problem--thanks for that! I assume there is no easy way to implement this for a contest that is already in the Gym? (unless I just copy the contest and make it my own, which is undesirable, of course).

    For the second part, I am more worried about the potential errors in the large cases than I am in the small cases, so this won't necessarily solve the issue, but at least it makes more cases correct! =)

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      first part, as far as I know it's not possible with the current features of polygon for problems already in GYM.

      in second part, you can also make the time limit equal to 15 seconds in polygon and put your slow solution then make the package(which will generate the outputs) then when you put the problem on a contest on GYM you can change the time limit from the problem settings itself so you can change it from 15 second to the desired limit.