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/Intro_Start.md
2020-06-15 16:25:29 -07:00

3.5 KiB

id title author order
getting-started Getting Started Nathan Wang, Benjamin Qi, Darren Yao 2
  • Introduction
  • Contest Format
  • Choosing a Language

Todo:

  • Video clip from Brian Dean?

Introduction

The goal of competitive programming is to write code to solve given problems quickly. These problems are not open problems; they are problems that are designed to be solved in the short timeframe of a contest, and have already been solved by the problem writer and testers. In general, each problem in competitive programming is solved by a two-step process: coming up with the algorithm, which involves problem solving skills and intuition, and implementing the algorithm, which requires programming skills to translate the algorithm into working code.

A contest generally lasts for several hours, and consists of a set of problems. For each problem, when you complete your code, you submit it to a grader, which checks the answers calculated by the your program against a set of predetermined test cases. For each problem, you are given a time limit and a memory limit that your program must satisfy.

For those of you with experience in software development, note that competitive programming is quite different, as the goal is to write programs that compute the correct answer, run quickly, and can be implemented quickly. Note that nowhere was maintainability of code mentioned. This means that you should throw away everything you know about traditional code writing; you don't need to bother documenting your code, because it only needs to be readable to you, during the contest.

William Lin - What is Competitive Programming?

Contest Format

The USA Computing Olympiad is a national programming competition that occurs four times a year, with December, January, February, and US Open (March) contests. The regular contests are four hours long, and the US Open is five hours long. Each contest contains three problems. Solutions are evaluated and scored against a set of predetermined test cases that are not visible to the student. Scoring is out of 1000 points, with each problem being weighted equally. There are four divisions of contests: Bronze, Silver, Gold, and Platinum. After each contest, students who meet the contest-dependent cutoff for promotion will compete in the next division for future contests.

See USACO contests.

Choosing a Language

If you're in Bronze, don't worry about the language! If you already know a language, just use it. You can always switch languages down the road.

In general, we recommend the following:

  • For Bronze contestants, any of C++/Java/Python will do.
    • If you know multiple languages, we recommend you pick C++ over Java, and Java over Python.
  • For Silver, Gold, and Platinum, we recommend C++/Java.
    • If you know multiple languages, we recommend you pick C++ over Java.

Note: A majority of high level contestants use C++ and Java. Between those, C++ is more popular.

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.