kingofnumbers's blog

By kingofnumbers, history, 6 years ago, In English

sometimes during a contest when I think a problem have tricky test case(s) I go to my room and start searching for solutions which doesn't handle those tricky cases but sometimes after I read about more than 15 codes I still can't find even single solution which doesn't handle one of these tricky cases then I start to think: am I unlucky because I am in a room where all its contestants are very careful for tricky cases?

but then after the contest I discover that all such test cases exist in the pretest so if a solution didn't handle one of them it will not pass the pretests, so I just realized that I wasted my time while reading the solutions.

that's why I want to suggest a new feature in codeforces round rules that makes us able to submit solutions to a problem even after locking it so we can submit solutions that doesn't handle those tricky cases so if it passed then we know those tricky cases doesn't exist in the pretests , ofcourse those submissions doesn't affect our points and only last solution submitted before locking is judged in the system testing.

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

»
6 years ago, # |
  Vote: I like it +42 Vote: I do not like it

Instead, why not make the pretests visible just like they are in practice. Ofcourse you can only see them after passing pretests and locking the problem.

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

    That is a good idea , but I feel this will allow for easier cheats e.g. what if one asked his friend who already passed a problem: what is the pretest #6 I am stuck at it.

    or maybe creating multiple accounts and submitting TLE solutions with the fake account to open the pretests? (note sometimes TLE algorithms might pass the pretests) or maybe there's other ways of cheating.

    I think allowing for submitting solutions is safer

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

      haha... If someone want to cheat then why would he need pretests ,after locking he can directly submit other's solution with his second account...

      • »
        »
        »
        »
        6 years ago, # ^ |
        Rev. 2   Vote: I like it -6 Vote: I do not like it

        I meant in case one has a solution which fails on some pretest and he doesn't know why then he submit bruteforce TLE solution with second account to reveal that test which his main solution is failing on

        after all now I think my idea is just a bad idea and can't be applied

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

          How exactly do u think that brute force tle solution will pass pretests? And well cheating with fake accounts and help of other persons are things which is very difficult to stop.

  • »
    »
    6 years ago, # ^ |
      Vote: I like it -14 Vote: I do not like it

    That's not good idea. You should understand what pretests your code has overcome. Otherwise you are less thinking. I'd like to think more, than see all pretests.

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

      didn't u see what i wrote? Show pretests only after locking the problem ! What will you do with pretests after locking the problem ?

      • »
        »
        »
        »
        6 years ago, # ^ |
        Rev. 2   Vote: I like it 0 Vote: I do not like it
        1. You can find that your solution is incorrect.
        2. It will become easier to hack others — less thinking.
        3. You can find ideas for hack, less think by yourself.
        • »
          »
          »
          »
          »
          6 years ago, # ^ |
            Vote: I like it +16 Vote: I do not like it

          LOL :D

          you either don't know what locking a solution means or you don't know what a pretests means

          • »
            »
            »
            »
            »
            »
            6 years ago, # ^ |
            Rev. 4   Vote: I like it 0 Vote: I do not like it

            Imagine: user m.Sina writes his solution of #306 div.2 A — 11425971, and it overcomes pretests. Then he locks that submission, and in your case — watchs the pretests. He sees the pretest #4. This pretest can serve him idea that he made a mistake. If so, he knows that he will gain 0 pts of that problem (and interactively he can change his strategy for gaining points for having better overall standing). And after he understands his mistake (which will be on test 17 after the end of contest), he can try to find similar mistakes in other's solutions.

            • »
              »
              »
              »
              »
              »
              »
              6 years ago, # ^ |
              Rev. 2   Vote: I like it +19 Vote: I do not like it

              How the pretest #4 will help him know that he has a mistake while his solution passed that pretest?

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

                Read again: it can serve an idea, it doesn't make him know. Because pretest #4 has similarity to test #17, which catches his mistake. it can be that user didn't thought about such pretests (#4 and #17), but passed the first. After seeng the first, he can realize (if he think more about it) that he has a mistake.

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

                Or imagine, if one of the pretest would be "ABXABXABX" and contestant has square complexity for string where are lots of "AB" and no "BA". Then it could serve an idea that if the test would be longer (#8) — it will cause TLE for his solution.

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

                  so what will u do after seeing that your code is going to fail. You have already locked the problem and you cant change it anymore!

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

                  "And after he understands his mistake, he can try to find similar mistakes in other's solutions."

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

                  Suppose you are noob, who can solve problem A but B is usually difficult to you. Then after you solved problem A, you see that very much noobs solved A too, but faster than you. Then you have two strategies: try to gain +100 points from successful hack and increase your position very much, or try to solve B, for more better place. If you lock A and understand that you failed it, you know, that you should go to solve B instead of trying to hack on A. If you don't know, you either still hack either solve B.

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

    Indeed. I always thought it would be good if we could see pretests after locking the problem. Codeforces should really consider this.

»
6 years ago, # |
  Vote: I like it +52 Vote: I do not like it

That is a very good point, I also experienced this feeling and think that this is an important issue.

»
6 years ago, # |
Rev. 3   Vote: I like it -20 Vote: I do not like it

I think hacking is "all about to see if there is a bug in the code(may be wrong code or solution ) and not on well we generate tricky test cases".

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

    most cases when a solution is hacked it is because it didn't handle tricky cases, not because there is a bug.

    but sometimes all tricky cases exist on the pretests and that causes me to waste time when I try to find a solution to hack

    • »
      »
      »
      6 years ago, # ^ |
      Rev. 2   Vote: I like it -30 Vote: I do not like it

      There is a bug in code that's why it doesn't pass as per you say "tricky test cases". So your code failed because it had a bug and it didn't failed because of a test case(which u might be tricky for some and not tricky for others). When u don't pass any test case it is a BUG that resides in your code.. IT's All about "perception". How u look at it,what i have seen, people just use a single tricky test Case and without even trying to look at the code they try to hack it and get Successful.

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

        what i have seen, people just use a single tricky test Case and without even trying to look at the code they try to hack it and get Successful.

        I don't how you have seen that, but trying to hack all codes in your room without reading the code is definitely not a good strategy...

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

          I don't agree with peaceful_warrior's vision, but I have seen hacking without looking work a few times, particularly in topcoder where hacking time is scarce and people are hacking at the same time and you need to hack fast.

        • »
          »
          »
          »
          »
          6 years ago, # ^ |
            Vote: I like it +12 Vote: I do not like it
          • »
            »
            »
            »
            »
            »
            6 years ago, # ^ |
              Vote: I like it -16 Vote: I do not like it

            Does he frequently do this?
            because as far as I remember, SRM 639 was a special case, many users (even reds) resubmitted their solutions during the contest, which means that there was a very high chance of successfully hacking other users