Beta
Write the editorial, not the boilerplate.
CP Lang is a language for competitive programming. It compiles to one readable C++17 file you submit anywhere.
Press Run (Ctrl+Enter).
The limits from the statement are the types. Change 90 to 900 in the input and run: the run stops and names the value.
Compare with the C++ (15 lines against 3)
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
assert(1 <= n && n <= 200000);
vector<int> a(n);
long long sum = 0;
for (int& x : a) {
cin >> x;
assert(1 <= x && x <= 100);
sum += x;
}
cout << sum << "\n";
}A standard library built for contests
Segment trees, shortest paths, union-find and modular arithmetic are one line each. Browse the library (63 modules)
Press Run (Ctrl+Enter).
Point updates and range minimum. You give SegTree the operation; fold takes the range as the statement writes it.
Whole olympiad solutions
Complete solutions to real olympiad problems, next to more of the syntax they rely on. Run each in place; one the compiler does not run yet shows its status instead, until it does.
Press Run (Ctrl+Enter).
CCO 2021 Travelling Merchant, the whole solution. Peel dead ends off the reversed graph, keep the rest, and settle answers from a heap.
Press Run (Ctrl+Enter).
The statement's format and limits are written once. They drive parsing, validation and the width of every value.