How do I start using code forces

Programming as a Sport: What to Do to Win Competitions

Hello Habr! Today I would like to introduce you to Andrey Chumachenko, head of the Irkutsk sports program community and award-winning participant in programming competitions, including the ICPC and the All-Siberian Olympics named after I.V. Pottosin.



We talked to Andrey about sports programming, preparing for competitions and his work as a trainer. Under the cut - useful and harmful advice for participants in the competition, questions of motivation, stories from the competition, attitude to the Unified State Exam and the Irkutsk School of Sports Programming.





Final of the ICPC Student Team Programming Contest 2016 (Source: ICPC Live)



Andrey Chumachenko - Founder and head of the programming community in Irkutsk, master's student at ISU in basic computer science, winner of the semifinals of the student world championship in programming of the ICPC - 2018, 2019 (among the CIS countries), winner of the after IV Pottosina - 2018, 2019 (among the CIS countries), winner of the quarter-finals of the student world championship in programming (among students of Eastern Siberia) - 2018, 2019, winner of the Altai Universiade in programming - 2019 (among students and pupils of Russia), finalist of the BSUIR programming championship - 2018 , 2019.Andrey was



became aware of our radars when he was conducting a free intensive course on sports programming problems at the Irkutsk Boiling Point ... Since the subject is hot we decided to find out everything in detail.





What is it eaten with?



- What is "sports programming" and what tasks are you doing there now?



- For me this is first and foremost a competition, preparation for them and, of course, a special community of people.



After all, for Shipulin, programming is like a biathlon for someone: real sport, passion, fire.


As for the assignments, everything is simple: you need those that can be solved in five hours, mostly algorithmic, math, and implementation tasks.





In 2016 UrFU students just won the international programming championship Challenge 24 in Budapest. Then seven teams from Russia came into the top ten (Source: codeforces.com)



- What is the most popular language in the sports program today? My friend at Moscow Poly for Applied Computer Science (janka2330) studied sports programs as a subject and passed the test. Says it was cool. They competed with fellow students and submitted assignments to spoj.pl (spoj.com) and wrote in Ruby on Rails.



- The language is very competitive. Most often I meet C ++, Java and Python are also popular. Another "newbie" Kotlin has gained momentum lately. Ruby on Rails, or just Ruby, is rarely used, but it was on the list of supported languages ​​in some competitions. I always write in C ++ myself, and so do my students. It seems most convenient to me when you need to code something quickly.





Languages ​​most commonly used in competitions





How to Prepare for Victory



- Tell us about preparing for the competition. You probably have your secrets.



- During a few years in this field, I realized that everyone has their own way of training. For me, this is an exercise that solves problems all year round. An analogy can be drawn with learning to drive: the more hours I skated, the more experience I gained. So we go with the students. There are violations of the rules, dangerous turns, overspeeding, but in the end we get to the cherished destination.



To develop problems we use codeforces.com. There are regular online rounds in which you have to solve problems that earn points for the assessment of the participant.


Then we track progress, compare the results, and set up a debrief to be more successful in the next round.





Archive of the Olympics problems codeforces.com



We're also looking at acm.timus.ru - the largest archive of programming problems in Russia with an automatic verification system. A lot of things have now appeared on YouTube, but we don't use them all the time. If interested, I can advise a cool Polish programmer by the nickname Errichto from there, he has his own channel, there you can dig up a few useful things.





The second channel of the Polish programmer nicknamed Errichto on YouTube



Well, and books, of course, like without them: "The Art of Programming" by Donald Knuth, for example. Or “programming problems at the Olympics. Contest Preparation Guide "by Steven Skiena and Miguel Revilla.


Life hacks for the participant



- Ok, what can stop you from winning the Sports Program Olympics?



- Probably the enemy of all students is laziness (just kidding). But seriously, you need to focus on tasks and briefly turn off the part of the brain that is responsible for all kinds of daily affairs.



It is also very harmful to exercise the evening before competition, especially if you haven't prepared for a year.


On the contrary, I would advise taking a week off and not making any decisions. In the rest, if you've worked well for a long time, the brain will put things in order in the accumulated archives.



In the competitions themselves, it is a big mistake not to listen to your command and run ahead of the locomotive. This threatens with fines and similar problems. Well, perfectionist programmers run the risk of playing around with a task to find the perfect solution and clean code. This does not mean that you have to do everything anyway, but the main thing is not to overdo it.



- What do you have to do to win?



- According to my feelings, for great success you need to get a little angry, but at the beginning of your career - take a calm demeanor and stick to the plan.



When to become a programmer



- Tell us about your path in sports programming.



- I think I started dealing with this topic quite late: it was only in high school classes that I began to seriously study C ++ and take part in the Olympics at the Irkutsk universities. After attending ISU, I met a teacher who supported the sports programming movement and began studying with him. Gradually, sports programming was no longer a hobby for me, I took it seriously, took an active part in competitions and developed into a trainer.





Andrei investigates one of the problems of the Irkutsk training camp in August Olympics



- do you think it's too late to start high school? Can programming really be compared to a professional sport in which children are sent from almost three years of age?



- Not enough, of course, to get a child to learn algorithms in three years time. However, if it suddenly becomes interesting, it's welcome. I even know of some programming tutorials for preschoolers.



But in addition to schoolchildren, schoolchildren and already experienced programmers, I also met people from the fifth or sixth grade at competitions who are not inferior to the students and even understand everything in no time at all.


The sooner the better.



The exam is a painful subject



- How do you rate the Unified State Exam and similar standards by which knowledge has been measured since we started talking about school children? After all, programming is a creative, albeit purely technical, specialty.



- I am definitely in favor of subjects in schools and universities in particular being voluntary and allowing a person to choose from a whole range of options. It's much more enjoyable to study this way, and the result is obvious - you can't compare when you're doing everything under one stick.



The Unified State Exam is a painful subject. Here I can tell the story of another article.



The Unified State Exam actually contains some interesting and useful assignments when it comes to taking the math or computer science exam. Yes, it is not perfect, there are flaws, experiments, there is no individual approach, but otherwise the knowledge of the graduates cannot be appreciated on a large scale. The Unified State Exam has flaws, but nothing better has been invented.



Admission to universities is also mostly done by teachers, but there is less objectivity and standards, everything is controlled by a small group of people. With this approach, I don't even want to talk about corruption, bribery, and popping up unwanted events.



Now you can participate in universities based on the results of the Olympics. And that's cool for top students, for 10%. What about the rest? Just the exam.


Yes, there are simple third-level Olympics on the list, but they are often more cumbersome or contain problems from the exam.



Another thing is the setting and presentation of the exam. All this hysteria, which is mainly captured by parents, society and teachers. It is unnecessary. The same teachers are often completely incompetent when it comes to preparing school children for the exam. It is not about the difficulty of the exam - there is nothing supernatural about it. The point lies in the weak level of teachers, their salaries, the attitude of the state towards them. School children also suffer along the chain.



About standards in general - of course, education should go towards flexibility. As I said, it would be good for school children to choose the topics they want themselves. The USE is not bad in this regard: you can take it in any number of subjects. But ideally one should learn to see the student as an individual.



- Don't you see a similar stereotype in evaluating knowledge in programming Olympiads? Or is everything different there?



- The essence of the Olympics problems lies in their immense non-standardity. Yes, from time to time you come across the button accordion tasks. There are tasks for basic, basic techniques and algorithms. The most important thing about the Olympics, however, is to be able to apply, combine and apply these techniques and to be able to recognize the mathematical idea of ​​a solution. This is definitely a unique skill that goes beyond any template.



Why do school children learn sports programming?



- What is the motivation of high school and high school students to join sports program communities and participate in Olympics? What can sports programming teach them, what skills does it help to develop?



- The motivation is completely different: someone came to learn a programming language and gain more practice and algorithmic knowledge, someone wanted to try themselves and themselves (taking part in the Olympics is another test). Some collect portfolios for university admission or future work, they want IT companies to take notice of them during the competition. There are those who come to communicate, support, and develop the community.



. , , .


And of course teamwork, everything is like an adult here: in order to get your project to work, you have to be able to work effectively in a team. Well, the development within the programming (language skills, algorithms) was not interrupted.



- What are you doing in your sports program community?



- Today I train students and we go to Olympics and competitions in the sports program. Among my students are winners of the quarter-finals of the Student Programming World Championship (among students of Eastern Siberia) 2019, winners of the Siberian website of the semifinals of the Student Programming World Championship ICPC 2019, winners of the Altai Universiade in the 2019 program, finalists of the Pottosin Olympiad 2018 and 2019.



There are plans to create a full-fledged sports program school that can be used to study with children from the fifth grade. Hopefully we'll start it in October.



I also try to develop relationships with IT companies to provide employment opportunities for my students.



We also organize programming competitions and not so long ago we ran an intensive program that lasted 11 days. Almost every day there was a five-hour competition, followed by an analysis of the problems - the so-called error work and lectures (a little theory about algorithms). Me and my friend from MEPhI acted as trainers. The participants in the intensive course were students from the ENTER Olympiad training center from Ulan-Ude (Republic of Buryatia) and students from Irkutsk who regularly take part in Olympiads for sports programs.











— . , , . : , , . — — , , . : ? — , , …



- I think it's good. Yes, you have to work quickly but at the same time be clear, otherwise the system will not accept the task. There are also penalties for an incorrect answer that no one wants to receive. You need to pay attention to details so that the understanding of the problem in the Olympics is perfect.



Code cleanliness sometimes suffers as the maintenance cycle is only five hours. The more experience a participant has, the more closely they follow the code.



- Share interesting stories from the competition.



- All of our funny stories are usually related to tasks. For example, I once struggled with a solution for a long time because I failed to notice that the phrase "No Solution" had to come up with the letters rearranged in one place - no solution.



Or at last year's World Cup quarter-finals, we sent the problem to the system for review two seconds before the end of the competition, and in the end the problem was successfully resolved. Such things always happen on the basis of emotions that only cause excitement.






A minute of advertising for our accelerator



For AI projects We have started accepting applications for Archipel 20.35 - an educational intensity for those carrying out projects using machine learning and data analysis methods. The project can be commercial, social, scientific - or write your version. At 8:35 p.m. Archipelago there is a great opportunity to improve yourself and your project, put together a team, get a grant and find a sponsor as development funds and companies implementing AI have expressed interest in developments.



The selection and pre-acceleration training is free. And if you write about your project on Habré, you will receive a plus in the qualification evaluation! In our blog we will keep you informed about the most interesting projects.





More articles:


All Articles
Geek Annual Info (GAI)
Brandenburgische Str. 69
75365Calw, Germany
07053 36 45 84