FAQs

A programming contest is a contest where programmers attempt to solve problems by writing programs. These problems are typically posed as a problem statement to describe the problem, input that the program must process, and output that the program must produce. The goal of solving the problem is to write a program that produces the same output for a given input as the judge's solution.
When you submit code for a problem, your code is automatically run against secret test data and judged based on the output it produces. Your code can recieve the following verdicts:
  • Accepted: Your code produced the correct output for all test cases.
  • Wrong Answer: Your code produced incorrect output for some test case.
  • Runtime Error: Your code threw an exception and exited with a non-zero exit code.
  • Time Limit Exceeded: Your code ran longer than the time allowed.
Your score is determined by two factors: the number of problems you solve and the number of penalty points you accrue. Contestants are ranked first on problems solved and then on penalty points. A contestant who solves 5 problems will always rank higher than a contestant who solves 4 problems, but two contestants who each solve 4 problems will be ranked against each other by penalty points.

Penalty points are determined by the time it takes you to solve the problems and the number of incorrect submissions that you make. When you solve a problem, you accrue 1 penalty point for each minute that has elapsed from the beginning of the contest and 20 penalty points for each incorrect submission you made to that problem. For example, if you solve a problem 137 minutes into the contest after making 2 incorrect submissions, you will accrue 177 penalty points. You do not accrue penalty points for incorrect submissions to a problem if you never solve that problem.

For example, if Jim and Bob solve problems at the following times,

Problem 123 45
Jim 37 minutes,
1 wrong
57 points
14 minutes,
2 wrong
54 points
43 minutes,
0 wrong
43 points

5 wrong
0 points
59 minutes,
1 wrong
79 points
Bob 7 minutes,
0 wrong
7 points
23 minutes,
1 wrong
43 points


0 points
53 minutes,
2 wrong
93 points
41 minutes,
1 wrong
61 points

Jim will receive a total of 233 points, and Bob will receive a total of 204 points. Since Bob has fewer penalty points, he will rank above Jim.
There is language documentation available for the following languages:
The following languages are compiled with non-default compiler flags:
  • C: -std=c11 -O2
  • C++: -std=c++17 -O2
There are several reasons you could be getting Wrong Answer, but here are the two of the most common:
  • Your output formatting does not match the judge's. Output formatting must exactly match.
  • Your method of solving the problem is incorrect.
There are several reasons you could be getting Runtime Error, but here are a few of the most common:
  • Your code divided by zero or took the square root of a negative number.
  • Your code read or wrote to an array at an index that was out of bounds.
  • Your C/C++ code dereferenced an invalid pointer, such as nullptr or a pointer to an object that had been deleted.
  • Your Java code called a method on a null object.
  • Your Python code exceeded Python's recursion depth limit. Python allows only a few hundred recursive calls to a function.
  • Your C/C++ code failed to return 0 from the main function.