Login🔥New to Challenges? Register➡️
Are you a Replyer?Access with Reply credentials
Hello! I’m Kamil, a competitive programmer from Warsaw. I’m part of the Errecto team that won the Reply Code Challenge 2020. I also have a YouTube channel with more than 200k subscribers where I teach programming. I was 13 when I wrote my first code, and 15 when I started programming competitively. I was good at maths and a friend told me about POI (Polish Olympiad in Informatics) so I checked the problems out and solved some in a few days (the first stage lasts for a month)!
Competitive programming, also called sports programming, is a mental sport (just like chess) where the aim is to quickly solve programming and algorithmic-based problems. You need to come up with an efficient enough algorithm and then execute it in your programming language of choice. For example, solving a Sudoku puzzle or finding the shortest way to get from one city to another.
Competitive programming is almost always a hobby. Most people who do it are either students or work part-time. They’ll spend around 20 hours a week on it, in the same way people play video games or build Lego sets.
From past-time to full-time
I’m an exception because I do it full-time. This doesn’t mean I take part in challenges every day. You can’t live just on the prize money from winning competitions. So I also organise competitions and teach people how to compete, which is very important in the world of competitive programming.
If you want to compete full-time, you can. There’s usually at least one competition every day (there’s a great list on clist.by). There are different categories of contests, too. Some are for beginners, while others are open to anyone. I take part in about two competitions a week where there are no prizes, (for example, codeforces), but instead a lot of rounds as part of an annual league. Once a month, I join a challenge with a big prize or which has several qualifying stages to complete to advance to the final.
The Reply Code Challenge is one of those competitions with a lot of participants, and which you really care about.
Native C++ speaker
In terms of programming languages I know Python and Java reasonably well, but I’m fluent in C++. It’s the most common language in competitive programming for two reasons: firstly, it’s very fast in terms of running time (it’s an advantage if your program is twice as fast than your competitors); secondly, it has a lot of algorithms and data structures in the standard library, such as balanced tree or sorting function. Indeed, Python has tons of machine learning libraries, so can be a good choice for machine learning competitions, but if I had to choose between writing 100 lines of code or simply importing something… well, I think the answer’s pretty obvious.
ve just a few lines, others 50 lines, while some might have 200-300 lines. Many people just copy and paste 20-line algorithms like dijkstra. I use it so often, I know it by heart. But if I have to spend 15 minutes writing a longer algorithm in a competition (like the Reply Code Challenge) that lasts 4 hours, I’ll just copy and paste. This reduces the possibility of mistakes, and I can be confident it will work as I wrote it in the past. Of course, this makes sense only if I know I don’t need to modify the algorithm itself.
With my ICPC team (ICPC is a three-person team competition where you can write 25 pages of complicated algorithms related to graphs or geometric), we wrote 40 or 50 algorithms, that I now have in my personal library. I regularly copy and paste 5-10 of the most useful ones.
Being good with numbers
If you want to succeed in competitive programming you need to be good at maths. If you just want to be a programmer, the maths isn’t particularly difficult. However, in competitive programming you almost always need to optimise some function or work with graphs or something similar. You also have to use some combinatory or recursive processes to verify what you’re doing is correct. During a competition you don’t have to be 100% sure your solutions are right, because there’s no time for that. But 99% is good 😄 I like approximation and optimisation problems best. Most people don’t enjoy them, which may explain why I often get a high position in them. After solving thousands of standard problems, optimisation problems – which are just about ideas – are more interesting to me. The Reply Code Challenge is one of those optimisation contests I really like.
Putting a team together
I have at least a dozen people who I could team up with in competitions. Of course, living in the same place as your team members is a plus, because it’s easy to meet up and communicate live. Last year, this was impossible due to Covid, but we worked well together from our houses and managed to win the Reply Code Challenge.
When you build your team, it’s great if you all have complementary skills. You’ll appreciate someone who’s good at maths at a certain point in a contest, just as you will someone who’s good at graphs.
Once we’ve formed a team, we usually meet every week for 5-7 hours to train, compete, and analyse our performance after the competition’s finished. If we’re approaching a big competition, we can train for up to 20 hours a week. You can also go on programming camps, for example at Petrozavodsk University in Russia (https://camp.icpc.petrsu.ru/2021w), and train for 10 hours a day.
Travelling the world
Being at the top of competitive programming means you qualify for competitions all over the world. Most of the countries I’ve visited are thanks to competitions – the USA, Canada, Morocco, China, India, Russia, and almost all of Europe – and it’s always free.
When I started competitive programming, my aim was to be hired by a big company, but I soon discovered I really liked organising competitions and inventing problems, testing them, and coordinating things. Organising challenges really satisfies me right now, but it’s not sustainable, as I can’t have new ideas forever. I think in a few years it will be almost impossible for anyone to create something new.
Right now, I’m more into education: for example, programming camps, my YouTube channel, online videos to help as many people as I can, and growing the community. Maybe in future I’ll join a big company if I want to work on a big and interesting project, or perhaps a start-up where you can make a real impact. We’ll see! Some programmers I met in competitions started their own machine learning company a few years ago when machine learning was the thing.
I think it’s best to always do something you’re better at than others. So maybe I’ll start a company that organises camps and challenges! One last thing. Almost everybody can try programming, and as long as it makes you happy you should carry on. And in the current market, you’ll be sure to find a good job. If it doesn’t make you happy, perhaps it’s not the right fit. In which case, just try something else until you find what does makes you happy! 😊
Want to be the next winner?
Register on Reply Challenges and get updates on the next challenge!