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

Автор dextrous, 11 лет назад, По-английски

I tried to hack the solution http://mirror.codeforces.com/contest/548/submission/11295460 using the hack http://mirror.codeforces.com/contest/548/hacks/155602/test but it was unsuccesful .

I am unable to understand that despite being a O(n*m*q) solution, how the solution passed the hack but eventually got TLE on a system test?

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

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +15 Проголосовать: не нравится

My guess is that since your case was all zeroes, the code ran fast because of branch prediction, while the system test had random data.

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

Also if I understand correctly on your test ouptput is 1 digit per line while the test which gives TL output is 2 digits per line