DottedCalculator's blog

By DottedCalculator, history, 4 years ago, In English

In the recent div 3 and div 4 rounds, I keep getting hacked.

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

| Write comment?
»
4 years ago, hide # |
← Rev. 3  
Vote: I like it +33 Vote: I do not like it

Submitting your recent hacked solution adding in

import sys 
input = sys.stdin.readline

ACs in 326ms/2000 ms.

In problems with many testcases, calling print $$$T$$$ times, can be very slow, so it can be much faster to store all $$$T$$$ answers in an array out and call

print('\n'.join(map(str, out)))

once at the end of your programs.

»
4 years ago, hide # |
 
Vote: I like it -16 Vote: I do not like it
The only possible way that guarantees that you will avoid being hacked
»
3 years ago, hide # |
← Rev. 2  
Vote: I like it +13 Vote: I do not like it

It happened again, this time in C++ :(

»
3 years ago, hide # |
 
Vote: I like it +19 Vote: I do not like it

Now, you've hacked the editorialist's solution itself.