Content

Notes for coding competitions.


Complexity

TLE

10^8 int operations/10^7 floating point operations in a for loop run in around 1 sec.

  • n = 20: exponential ok
  • n = 100: O(n^3) ok
  • n = 1000: O(n^2) ok
  • n = 10^4: n*polylog(n) ^ n*sqrt(n) ok
  • n = 10^5: nlogn ok
  • n = 10^6: O(n) ok
  • n = 10^9: O(logn) ok

Online Resource

Data Structure

Timus OJ