I am having a time limit exceeded error in my code. I need some help regarding this
created
last reply
- 2
replies
- 486
views
- 3
users
I am having a time limit exceeded error in my code. I need some help regarding this
In C++, I apparently made my code run faster by using sqrt() instead of floor() and not defining any functions, maybe that could work for you. Also remember no new line after the last test case. By the way I didn’t use Eratosthenes sieve or segmented sieve or something, it’s possible to do this with only just for loops and if statements.
Topic | Category | Replies | Views | Activity |
---|---|---|---|---|
WTPZ2001G/Diamonds - NZEC | ProblemSet Archive | 9 | 257 | Jun '24 |
Why my topo code not working! | ProblemSet Archive | 3 | 245 | Jun '24 |
What am i Missing | ProblemSet Archive | 1 | 98 | Feb 22 |
COT - Count on a tree - TLE | ProblemSet Archive | 1 | 76 | Mar 18 |
AIBOHPHOBIA - LPS vs Direct Approach | ProblemSet Archive | 1 | 59 | Mar 31 |