MOOONI's blog

By MOOONI, history, 5 years ago, In English

Hello, I've realized in new codeforces contests that in lots of problems the input starts with an integer t ! the number of test cases,
so what is it used for ? why not just one test case instead of lots of them ? does it make judgement easier ? in past this way of representing input was not common, so what happened ? if you know answer to my questions above please answer in the comments :)

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

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

I think it helps in 2 ways.

1) You can check more cases in less number of actual tests (1 test has multiple cases)

2) This is ideal for questions that need precalculations. Just 1 case is usually not enough to check such stuff.