Comment Re:Language shouldn't push you past the limit (Score 2, Insightful) 407
Having competed in a handful of collegiate programming contests about 10 years ago, the CPU time limit was never even a passing concern. Granted, we were coding in C++, but even in Python, any solution that hits the CPU limit on these contests is quite likely an unnecessarily complex algorithm.
Python makes for much faster coding and debugging and works on many problems. But there's a whole range of contest problems bomb out in Python:
1) Large inputs or outputs and short time limits. Python's "print" statement is simply not fast enough for large-output problems.
2) Billions of booleans. In C++ you would use bitboards and bitarrays, maybe a 100MB worth. Using native Python data structures the memory can run into gigabytes. Using numpy, the bit-twiddling will still be many times slower.
3) Some problems with tight loops and a time limit is set at a couple times the speed of the author's C or Java solution. Python being 10x slower on such loops takes it over the time limit.