Skip to content

Introduction to Competitive Programming

What is Competitive Programming?

Informatics olympiads, also known as competitive programming, is a form of programming where contestants are required to solve problems within a certain time limit.

Their code will be checked against a set of inputs and outputs, which determine if the code is correct.

This form of programming requires a vast amount of knowledge in common algorithms, math, as well as logical thinking.

Common Terminology

Not sure what the abbreviations mean? Here you go:

Abbr.MeaningNotes
ACAll CorrectYour code produced expected results with the testcases provided.
WAWrong AnswerSome/all of the testcases did not produce the expected result.
TLETime Limit ExceededYour code has run for too long, and the program was killed.
MLEMemory Limit ExceededYour code took up too much memory, and the program was killed.
RTE(6)Runtime Error (6)Your program has overflowed in terms of memory capacity.
RTE(11)Runtime Error (11)Your program accessed areas in memory which were out of range.

For those interested in USACO:

Abbr.Meaning
*Correct answer
XWrong answer
!Runtime error or memory limit exceeded
EEmpty output file
MMissing output file
TTime limit exceeded

Hello, World

A very simple program allowing you to AC this CP problem

cpp
#include <iostream>
using namespace std;

int main() {
  cout << "Hello World";
  return 0;
}