Choosing a Language
The CCC accepts C, C++, Java, Python 2, and Python 3. You can choose a different language for each problem, so you are not locked into one choice for the entire contest.
For most people, the best language is the one they are already comfortable with. Language choice only becomes important when performance starts becoming a problem.
It may not always be possible to achieve a perfect score with a particular language choice (for example, Python or Java). However, there is always at least one choice of programming language for which it is possible to achieve a perfect score [...]
— CEMC, CCC details
In practice, this means every problem is designed to have a solution in at least one supported language. Some languages may require more optimisation than others, especially on larger inputs.
Contest environment
Unless a problem states otherwise, submissions run with the same default limits:
- 3 seconds time limit
- 512 MB memory limit
- exact
stdin → stdoutjudging (no prompts or extra output) - up to 50 submissions per problem (maximum one submission per minute)
Because the CCC keeps your highest score for each problem, testing different approaches or languages is not a major risk.
Language comparison
| Language | Summary |
|---|---|
| C | Fast and supported, but lacks many modern conveniences. You will spend more time implementing data structures and managing memory yourself. |
| C++ | The standard competitive programming language. The STL (vector, set, map, priority_queue, etc.) provides most tools you need, and it is required for the CCO. |
| Java | A good choice if you already know it. It is usually fast enough, but slower input/output can matter on large problems. |
| Python 3 | Very quick to write and easy to learn. It has built-in big integers, but usually runs slower than compiled languages. |
| Python 2 | Mainly kept for compatibility. New solutions should use Python 3. |
What the judge runs
The official sample solutions show the compiler and interpreter versions used for CCC solutions:
- C: GCC 11.4.0, compiled with
-O2 -lm -static - C++: GCC 11.4.0, compiled with
-O2 -std=c++17 -static - Java: OpenJDK javac 17.0.10
- Python 2: PyPy 7.3.9 (Python 2.7.18)
- Python 3: PyPy3 7.3.9 (Python 3.8.13)
How to choose
If you already know a language, use it — switching usually creates more problems than it solves. If you are starting from scratch, Python 3 is the easiest entry point; it handles J1–J4 and many Senior problems without issue, and C++ can be picked up later when speed or advanced algorithms become necessary. Java works fine for the CCC; just watch input speed on problems with large constraints. If your goal is eventually reaching CCO, learning C++ early is worthwhile since it is the only language the CCO accepts.
References
-
CEMC — CCC details. Accepted languages and language limitations. https://cemc.uwaterloo.ca/contests/computing/details.html
-
CCC Rules (PDF). Contest limits, submissions, and scoring rules. https://cccgrader.com/rules.pdf
-
CCC sample solutions (PDF). Compiler versions and judge environment. https://cccgrader.com/sample_soln.pdf