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/Languages.md
2020-06-22 20:45:59 -07:00

3.1 KiB

id title author description
lang Languages Nathan Wang, Benjamin Qi 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, Java, and Python 3. 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.

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 (ex. AIME qualification) is helpful but not required.

Resources for Learning How to Code

Sololearn has courses on C++, Java, and Python. You don't have to complete the full course.

C++

  • If you use Sololearn, we recommend you finish everything up to (but not including) "More on Classes."
  • Ch 2 of PAPS also contains a C++ tutorial. Use one of these two resources (or find your own) to learn C++.

You do not need to learn pointers (for now). Knowledge of structs and classes is useful but not required.

Resources for Getting Started

Note: We don't agree with all views expressed in the links below. Let us know what works (or doesn't) for you.