This repository has been archived on 2022-06-22. You can view files and clone it, but cannot push or open issues or pull requests.
usaco-guide/content/1_Intro/Choosing_Lang.mdx
2020-07-14 21:02:57 -04:00

65 lines
2.5 KiB
Text

---
id: choosing-lang
title: Choosing a Language
author: Nathan Wang, Benjamin Qi
description: What languages you can use for programming contests.
---
## Choosing a Language
The most popular languages that USACO supports are [C++11](https://en.wikipedia.org/wiki/C%2B%2B), [Java](https://en.wikipedia.org/wiki/Java_(programming_language)), and [Python 3](https://en.wikipedia.org/wiki/Python_(programming_language)). 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). 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.
- For Silver, Gold, and Platinum, Python is not recommended, because it is a slow language.
- 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!
### Language References
All of these are provided at the IOI aside from the additional C++ reference.
- [C++](https://en.cppreference.com/w/)
- [Additional C++ Reference](http://www.cplusplus.com/)
- [Java](https://docs.oracle.com/javase/8/docs/api/overview-summary.html)
- [Python3](https://docs.python.org/3/reference/)
## Resources for Learning How to Code
Let us know what works (or doesn't) for you.
### General
<resources title="Learning to Code">
<resource title="Sololearn" url="https://www.sololearn.com/" starred>courses for C++, Java, Python</resource>
<resource title="Codecademy" url="https://www.codecademy.com/">free courses for C++, Java, Python 2</resource>
</resources>
<LanguageSection>
<CPPSection>
Use one of the resources above or below (or find your own) to learn C++. If you use Sololearn, you don't have to complete the full course; we recommend you finish everything up to (but not including) "More on Classes."
<resources title="C++">
<resource source="PAPS" title="2 - Programming in C++" starred>lots of examples, Kattis exercises</resource>
</resources>
<info-block title="Pro Tip">
You do not need to learn pointers (for now). Knowledge of structs and classes is useful but not required.
</info-block>
</CPPSection>
<JavaSection>
</JavaSection>
</LanguageSection>