C++ language
A reference on the basics of C++ that solutions in competitive programming rely on.
A variable is a named place in memory that holds one value of a fixed type, such as an integer or a piece of text. A program reads the input into variables with cin, computes the answer and prints it with cout. Every solution on a judge has this shape.
A loop repeats a piece of code: a fixed number of times (for) or as long as a condition holds (while). You need one whenever the input has values or an action must be repeated until something happens.
A function is a named piece of code that takes values, computes something and returns a value with return. Write one when a solution does the same computation in several places or for many values, such as a digit sum or a primality check inside a loop.
An integer type fixes the range of numbers a variable can hold: int up to about 2 \cdot 10^9, long long up to about 9 \cdot 10^{18}. A result outside the range overflows: the program prints a wrong number with no error, so a solution must use a type wide enough for every value it computes. If a value can pass about 1.8 \cdot 10^{19}, no built-in type holds it; use big integers.
Integer division a / b in C++ gives the quotient without its fractional part, and a % b gives the remainder: 11 / 4 is 2 and 11 % 4 is 3. They answer how many whole groups fit and how much is left over.