About AtCoder

Feb-12-2024

About “AtCoder”

AtCoder is a Japanese competitive programming website. It exists since 2012 and the contests are available in English and Japanese.

  • During a contest are proposed a set of problems, and in order to solve a problem the player needs to send a snippet of code to the server, which will run the code against a set of non-disclosed test cases. If the code behaves as expected on all the test cases, the problem is cleared and the player is awarded the corresponding points.
  • Pretty much any programming language is allowed. The AtCoder staff is often programming in C++ or Python.
  • There are different ways for the program to fail: WA (Wrong Answer), TLE when the program takes too much time, RE when there is a runtime error, etc.

Main difficulties

  • The first difficulty is the time constraint: for beginner contests you have 100 minutes to solve the 6 problems
  • If there is an error, the system doesn’t tell you WHY nor tells you the example where you failed. So you need to get very critical of your own code to figure out what kind of edge case you missed.

My Impressions - My Goals

  • I love math problems, doing the bi-weekly problems of The Guardian for example. Having to think about new problems every week is refreshing.
  • The first few problems are easy, but the difficulty goes up pretty quickly (at least for me), so it’s a good way to stay sharp.
  • It’s an objective way to measure yourself (even though software engineering is about more than writing algorithms in less than 90 mins).
  • A good way to practice problems around data structures: trees, graphs, and some maths.

My Environment

  • I started the contest in JavaScript - but this is way too slow.
  • I practiced then in C++, but I found the language a bit clumsy.
  • I am currently running in Rust. This is a strongly typed language, which is pretty convenient to enable the compiler to detect a lot of bugs (typos etc.)

Suite of tools

  • cargo atcoder to create templates, run tests and submit from the command line
  • AtCoder Problems to review former problems and follow suggestions about the next ones to attack
  • Allowed Libraries for a list of crates (e.g. Rust Libraries) allowed to use during the contest

How I train

The way I approach AtCoder is very similar to the way I approach running a marathon: I have no hope to win the competition, so I am mostly fighting against myself, in order to get better at it. And like when I train for running, I do in in the (little) time I have after work and taking care of the day-to-day of a family (which takes a lot of time!). So I need to stay realistic regarding my objectives and potential achievements. Basically I am practicing old problems, and if there is one for which I don’t find the answer, I drill down to the corresponding theoretical concept and make sure I understand the theory fully and how to implement it in Rust afterwards.

Some videos which helped me