Judging Frequently Asked Questions
How long are my programs allowed to run for?
Each problem has a per test case time limit. For example, if the time limit is 1 second, then your program must take 1 second or less for each test case. The time limit for a question may vary depending on the language you are using.
What do I do if my program is too slow?
The subtasks are designed to reward programs that can scale to larger inputs. Often a cleverer and more efficient algorithm is required to score more marks.
What do I do if my program gets incorrect answers?
This shows that there is a bug or a mistaken assumption in your solution. Test your code against a variety of your own input files to see if you can spot the mistake.
- Try testing your code against a variety of your own input files to see if you can spot the mistake.
- Read the problem statement again, to make sure you haven't missed any important details.
- Take a look at the Why did I score zero? for a list of common issues.
If your program gets an incorrect answer for any of the test cases in a subtask, it will not score any points for that subtask. It is important to make sure that your program is correct for all cases.
What’s better, a fast program or an accurate program?
An accurate program: it is better to write a slow but correct solution than a fast but incorrect one.
A slow solution will usually solve at least one subtask for partial marks, whereas an incorrect or buggy solution is likely to score zero.
Can I see the test cases that my program failed on?
No, the test cases used for judging are kept secret.