Tag: TLE
3 posts
-
Fast C++ I/O for Coding Tests: What sync_with_stdio, cin.tie and endl Actually Do
Why default C++ iostreams can cause TLE, what sync_with_stdio(false) and cin.tie(nullptr) change, and the traps: mixing printf, getline, interactive flushing.
-
Fixing TLE: Reading Constraints and Cutting Time Complexity in Coding Interviews
How to read N and Q to pick a target complexity, spot hidden O(N) steps inside loops, and replace nested loops with sorting, hashing, prefix sums or windows.
-
Algorithm Optimization Case Studies
Real-world case studies of solving TLE in competitive programming. Learn optimization techniques to improve from O(n²) to O(n log n), and O(n³) to O(n).