Choosing a Language
Authors: Nathan Wang, Benjamin Qi
What languages you can use for programming contests.
The most popular languages that USACO supports are C++11, Java, and Python 3. Pascal used to be popular in the past, but its use is rare now, and many programming contests have removed or are planning to remove support for it in the near future (in short: don't use it now). C is also supported, but it's essentially a strictly inferior version of C++ and doesn't have the built-in data structures that are often used. In general, we recommend the following:
- If you already know one of these languages, just use it.
- If you know multiple languages, we recommend you pick C++ over Java, and Java over Python.
- For Bronze, any language will do. It is possible to receive full credit with C++, Java, and Python in Bronze.
- For Silver, Gold, and Platinum, Python is not recommended, because it is a slow language and lacks an ordered map.
- Check Factors to Consider When Choosing a Language for more information.
Keep in mind that it's easy to switch languages down the road. Don't get caught up on which language to choose. Just pick the one you feel most comfortable with!
What if I'm not comfortable with basic coding (yet)?
The remainder of this guide assumes that you know the basics of how to code in one of the languages listed above, including the following topics:
- Data types
- Reading Input
- Writing Output
- If / Else
- Logical operators
- Basic Recursion (a function calling itself)
- Multidimensional Arrays
In particular, contestants using Java should be familiar with roughly the first half of AP Computer Science A.