Time limit on codeforces (and hacking)

Revision en1, by jerdno, 2020-05-03 17:49:32

Based on: https://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?



  Rev. Lang. By When Δ Comment
en1 English jerdno 2020-05-03 17:49:32 983 Initial revision (published)