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

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

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?

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

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

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.

»
4 года назад, # |
  Проголосовать: нравится +19 Проголосовать: не нравится
because YOU WILL NOT BELIEVE
»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

See reply to this comment.

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

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 года назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

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.