How this site works

A short tour of the whole thing: finding a problem worth your time, writing the solution, reading the verdict, and what the site records about it afterwards.

Finding a problem

The archive holds every problem on the site. Four controls narrow it down, and they combine: whatever you pick stays picked as you change the others.

  • Tier chips — click one for a single difficulty band, or a second to select the range between them. Click the same chip again to clear it.
  • Tags — pick as many as you like, then choose how they combine. Any finds problems carrying at least one of them, All only those carrying every one, and None excludes them.
  • Sort — easiest or hardest first, most or least solved, by title or by code. The column headings sort too.
  • Random — opens one problem drawn from whatever you have filtered down to, not from the whole archive. It is the fastest way past not knowing what to practise.

The count beside the controls says how many the filter found. The address bar keeps your filter, so a link to a filtered list is a link you can share or bookmark.

Sources is the other way in: browse by the contest a problem was set for, down through years and rounds to a single division.

Reading a problem

A problem page gives you the statement, the input and output format, any constraints, and worked samples. The samples matter most: each one usually carries an explanation of why the answer is what it is.

  • The chips under the title are the time limit and the memory limit your program has to stay inside.
  • The minus and plus buttons in the statement header change the text size, and the setting sticks.
  • Copy takes a sample to your clipboard. Run feeds it straight to your code without recording a submission.
  • Tabs above the statement hold every submission to the problem and a forum thread for it, in case you are stuck and want to read rather than ask.

Writing and submitting

You can write in the editor beside the statement, or open the full IDE for more room, several files and your own input.

  • Your code follows your account — drafts are saved as you type and kept against your account, not your browser. Start on a laptop, open the same problem on another machine, and the work is there.
  • Run — compiles and runs against input you supply. Nothing is recorded and nothing is judged.
  • Submit — sends the code to the judge, which runs it against every test case. The verdict streams back as the cases finish.
  • Every test case is judged, even after one fails, so you can see whether you are close or far off.

What the verdict means

Only the first tells you that you are done. The rest each point at a different mistake.

VerdictWhat happened
AC Every case matched the expected answer.
WA It ran and finished, but an answer was wrong.
TLE It was still running when the time limit passed. Usually the approach, not the code.
MLE It asked for more memory than the limit allows.
RTE It crashed. An index out of range, a division by zero, a stack overflow from deep recursion.
OLE It printed far more than any answer should. Often a loop that never ends.
CE It did not compile. The compiler's own message is on the submission page.
IE Something went wrong on our side, not yours. Submit again, and tell us if it persists.

Open a submission to see it case by case, with the time and memory each one took and, where the problem allows it, what your program printed next to what was expected.

Tiers and rating

Every problem carries a tier, from Bronze V up through Master. It is a difficulty estimate, and it is what the colour of a chip means everywhere on the site.

Your rating is built from four things added together: the problems you have solved, how you place in contests, duels, and a few one-off awards. Your profile shows the split, so you can always see which part a number came from.

Only your hardest solves count towards the problem part, so grinding easy problems does not move it. Solving something above your level does.

The full tier table lists every tier with its rating band and how many problems sit there.

Competing

  • Contests — run to a clock with a live scoreboard. Rated contests move your rating when they finish.
  • Duels — one problem, one opponent, first to solve it. Short and pointed.
  • Defense — hold a tier by solving problems at it under time pressure.

Tools

  • Graph editor — paste an edge list and the graph draws itself. Then walk an algorithm over it one step at a time — breadth-first and depth-first search, Dijkstra, Bellman-Ford, minimum spanning trees, topological sort and more — with the queue or the distance table beside it. Annotate over the top and export the result.
  • Notebook — somewhere to keep the snippets and templates you reach for repeatedly.

Your account

  • Your profile records what you have solved, your rating and where it came from, and a history of your submissions.
  • Settings holds the theme, the editor font, and whether mathematics is rendered or left as you typed it. There are several themes, light and dark.
  • Star a problem to keep it in Favourites for later.

Keyboard shortcuts

CtrlK
Search problems from anywhere
CtrlEnter
Submit, from inside the editor
?
Shortcuts for the page you are on, where it has them
Esc
Close whatever is open

On a Mac, Command stands in for Ctrl.