Language Setup and Contest Template
A C++ and Java template with fast input, multiple test cases, 64-bit integers and modular arithmetic, plus the errors that cost beginners the most submissions.
Why a template
In a contest you do not want to type input code from scratch. You keep one tested file and copy it for every problem. Everything here is about making that file correct and fast.
You need two tools:
- C++17 compiled with
g++ -std=c++17 -O2(-O2turns on optimisations, as judges do). - Java 17 with
javac Main.javaandjava Main. On Codeforces the class holdingmaincan have any name, but on most judges it must beMain.
1 of 9