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

Автор Sinux, история, 9 месяцев назад, По-английски

Hi, I was practicing solving problems from USACO and I became curious when I saw the test data. The majority of the test data have surprisingly large numbers of test data. How are these test cases made? Do the problems maker calculate the output with these unusually large numbers of inputs?(Sorry for the bad english)

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

»
9 месяцев назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

You can refer to Polygon,Testlib's Generator part and Cyaron's wiki for more information.

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

Large test cases near the maximum constraint are necessary to test that the contestants code is fast enough to receive full credit. These test cases generated and are run against the intended solution. When you take the contest, the same test data are ran against your solution and it will be judged correct if it matches the output of the intended solution.

»
9 месяцев назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

These test cases are made with a generator with testlib.h. Or maybe they’re generated by an automatic program that outputs random content to a file. Anyway, it can’t be typed manually.

Also, the corresponding reference output is generated by an automatic program that reads the input and writes the output.

You can use Polygon to do all these works.