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

Автор jerdno, история, 5 лет назад, По-английски

Based on: https://mirror.codeforces.com/blog/entry/76555

How is time limit handled on codeforces? Mu solution for problem C had T*N complexity, while solution in editorial had T*N*logN which would not make it in 2 seconds for big enough test set (for example if input would 900 test with string of length 10000 + 100 tests for edge cases). At the end of competition I saw such solution in room, but wasn't quick enough to hack it (with program that would generate 1000 * 10000 test set) and it passed system testing (even though I'm pretty sure that it would take more than 2 seconds). So my question is: is time limit in problem applicable for 1 test, or complete test set?

And to add: are there some limitations for hacking (for example time limit for program that is generating input, or number of characters for directly passing input)? Or did I completely misunderstood hacking and I should provide only 1 single test for input?

Thanks.

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

»
5 лет назад, # |
Rev. 3   Проголосовать: нравится +1 Проголосовать: не нравится

From the statement: "It is guaranteed that the sum of $$$n$$$ over all test cases is $$$\leq 10^5$$$."

The program which generates the input has a time limit of $$$5$$$ seconds, and if you want to submit a file containing the input then it must be smaller than $$$256$$$ Kb.