mkisic's blog

By mkisic, history, 5 years ago, In English

What do you think about multiple test cases in one file?
For me, it's very annoying. Why authors are choosing that way of input? Is there some limit on number of test cases?

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

| Write comment?
»
5 years ago, # |
  Vote: I like it +14 Vote: I do not like it

Switching from test to test in the server takes more time than your code switching from case to case, and it reduces the number of verdicts.

It makes the waiting time to get the final verdict smaller.

»
5 years ago, # |
  Vote: I like it +19 Vote: I do not like it
because YOU WILL NOT BELIEVE
  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Hi dalex, how to create a spoiler dropdown while writing comments? Sorry if this is a very trivial question. I am new here. Please don't downvote me

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

See reply to this comment.

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Apart from aforementioned testing speed-up reason, for many problems only a small percent of inputs can fail the wrong solution (for example, when greedy approach is almost optimal). And even T=100 effectively increases the probability that the wrong solution will fail the pretests.

»
4 years ago, # |
  Vote: I like it +9 Vote: I do not like it

There are a yes-no question and 10 pretests to it. The greedy would pass, and a lucky man would get pretest passed by random solution, and abuse the system by submitting it by another account, try hacking, and copying the other's code for the real solution.