84 lines
No EOL
3.4 KiB
Markdown
84 lines
No EOL
3.4 KiB
Markdown
---
|
|
id: lang
|
|
title: Languages
|
|
author: Nathan Wang, Benjamin Qi
|
|
description: What languages you can use for programming contests and what you're expected to know before continuing.
|
|
---
|
|
|
|
## 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)). 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.
|
|
|
|
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/)
|
|
|
|
## Expected Knowledge
|
|
|
|
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:
|
|
|
|
- Variables
|
|
- Data types
|
|
- Reading Input
|
|
- Writing Output
|
|
- Loops
|
|
- If / Else
|
|
- Logical operators
|
|
- Functions
|
|
- Basic Recursion (a function calling itself)
|
|
- Arrays
|
|
- Multidimensional Arrays
|
|
|
|
In particular, contestants using Java should be familiar with roughly the first half of AP Computer Science A.
|
|
|
|
- If you do not meet these prerequisites, see the links below to get started.
|
|
- Familiarity with [competition math](https://github.com/bqi343/USACO/blob/master/Resources/Competition%20Math.md) (ex. AIME qualification) is helpful but not required.
|
|
|
|
## Resources for Learning How to Code
|
|
|
|
|
|
### C++
|
|
|
|
Use one of these resources (or find your own) to learn C++.
|
|
|
|
<resources>
|
|
<resource source="Sololearn" title="C++" url="https://www.sololearn.com/Play/CPlusPlus" starred>also courses for Java, Python</resource>
|
|
<resource source="PAPS" title="2 - Programming in C++" starred></resource>
|
|
</resources>
|
|
|
|
If you use Sololearn, we recommend you finish everything up to (but not including) "More on Classes." You don't have to complete the full course.
|
|
|
|
<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>
|
|
|
|
|
|
## Resources for Getting Started
|
|
|
|
<optional-content>
|
|
|
|
Let us know what works (or doesn't) for you.
|
|
|
|
<resources>
|
|
<resource source="CodeSignal" title="CodeSignal" url="https://codesignal.com/">can practice basics with "Arcade," "Interview Practice"</resource>
|
|
<resource source="Philippines OI" title="Prepare" url="https://noi.ph/prepare/">lots of links!</resource>
|
|
<resource source="IOI" title="Getting Started" url="https://ioinformatics.org/page/getting-started/14">not so up to date</resource>
|
|
<resource source="Quora" title="Joshua Pan - Schedule for Beginners" url="https://www.quora.com/What-is-a-good-schedule-to-follow-for-becoming-better-at-competitive-programming-for-beginners">generally good, although CSES (see resources) is definitely a better place to start than USACO Training or Codechef</resource>
|
|
</resources>
|
|
|
|
|
|
</optional-content> |