Interview with Roman Udovichenko. Code Jam TOP 10 or how well Olympics are doing
Good day, dear habratchiteli!
Most likely, many of you have heard about sports programming olympiads. In recent years, a lot of competitions have appeared on this type of programming. This is Google Code Jam , and Topcoder Open , and Russian Code Cup . Today I was lucky to personally chat with Roman Udovichenko (as part of AYcamp, under the special Sauron program ), one of those who achieved serious success in them. He lives in Minsk, last year he graduated from the Belarusian State University, works for Yandex. He told how he was preparing for the Olympics and how they helped him in life.
I ask all interested under cat.

A: I started doing Olympiad programming in fifth grade. We had different circles at school, including computer science. I began to go to him and soon learned to solve problems and began to participate in the Olympics.
A: At first, my parents treated normally as a normal hobby, but they still were not allowed to spend time on a computer for a long time. For example, my mother set a limit so that I spent at the computer no more than one hour a day.
A: At the circle, we studied the IntAl programming language, then very simple algorithms. But then the teacher saw that I was doing very well, and a year later I proposed to solve very simple problems of the olympiad direction, starting with the fact that to calculate the area of the rectangle on two sides and the others are very simple. Later, I went to the regional Olympiad and realized that it was very interesting for me and further began to solve olympiad problems and study algorithms.
A: Everything went smoothly at school: at first I went to the regional, then to the republican olympiad, a few years later to the training camp for the international olympiad and the international olympiad itself. Probably one of the strongest joys was when I took a first degree diploma at the Republican Olympiad and went to the training camp for the international Olympiad. Perhaps, when we reached the final of the programming championship in the third year.
A: Good question. Perhaps I did not prepare enough for the last school international olympiad in the 11th grade, took a silver medal there, I was very dissatisfied with this. Probably, it was worth preparing more actively, but for various reasons I did not devote much time to preparation. Therefore, I only got a silver medal, although I had enough strength and skills, sort of like a gold one. Probably, this could have been somehow changed, but overall I am satisfied with myself.

A: Not quite like that: I try to more or less objectively evaluate my strengths and understand: in some situations I can count on victory, and in others I figure out where I can find myself, in which place, based, for example, on some general online workouts.
A: At the current level, I do not really train much. Because I have already graduated from university, I am engaged in work and participate in competitions, so to speak, having what I have.
A: It was Cormen’s textbook. Once in the eighth or ninth grade, I definitely don’t remember, I was not able to get to the training camp for the international olympiad, although I really wanted to. And then I had sports anger: “Damn, why, I can, I need it!”. Then my parents bought Cormen’s book, it’s such a healthy classic textbook on algorithms, and I began to purposefully read it throughout the summer.

A: If you really want to start doing Olympiad programming, then the educational process should be iterative: you try to solve a problem, you don’t succeed - you learn from senior comrades or teachers how it is solved. You learn something new, you try to solve new problems, again you don’t understand, and so on ... Such a practically theoretical approach should be alternated, because experience shows that if you just sit down on a textbook and start learning algorithms, and then try to solve problems, then most likely nothing will work out.
A: School years ... In school years, I tried every day, in addition to lessons, to solve some problems. It took several hours a day. In total, approximately 20-30 hours per week along with weekends. Fortunately, we had a good director in our school who was glad that he had such a student in the school, and therefore allowed me to attend classes almost all year round, which I enjoyed. (smiles) Thanks to this, I was able to devote more time to training. Although I had no problems with visits: I finished school with a gold medal.
A: I loved and still love to play board games with friends, at school, for example, we loved to play Colonialists. In addition, they played in Munchkin and other classic ones. He also played soccer and volleyball, in the evenings he often went to the stadium.

A: In my student years, everything was very complicated, because I really wanted to go to the finals of the World Cup, and there we trained for a while very hard, maybe even too much. There were days when we decided on two five-hour contests a day. When we wanted to go to the finals in the second year, we trained 40-50 hours a week, it paid off, but for some reason we still couldn’t go, but we succeeded in the following.
A: Yes, in the third year we took a place somewhere in the middle of the tablet. But I think it was connected with excitement. We were not able to cope with this feeling throughout the competition. All my thoughts were something like this: “Wow! Already everyone passes the tasks, everyone already has 2-3, but nothing works out for us! Panic, panic, panic - what to do? " This is unconscious, but very difficult to concentrate.
A: CIS performed well, many guys at the top of the table. I took 10th place, not because I did not come up with a puzzle, but because of a small ideological error. To be honest, I’m very disappointed to realize that I came up with how to solve, but I did not use the right approach.

left: Roma, Andrey Malevich, followed by a Google employee
A: Yes, probably there were none. I try to solve tours without undue stress: if at some point there is not enough effort to get to the next round - so be it. What about the solution algorithm: I try not to chase complex, overwhelming tasks, but strive to more confidently score points on more accessible tasks for me.
A: No, it doesn’t interfere. There are a lot of Olympiadniks in Yandex, both former and current, so we don’t have this: “Do not go to competitions, sit, write the code at work” (smiles)

A: I really like to teach children, this is one of my favorite activities in life. Unfortunately, in our country it so happens that teachers are not paid very high salaries, so I am not ready to devote myself completely to teaching. I also like programming, so I want to work in some large company, do some interesting projects and get a good salary. Of course, I also really like to teach children, so I am happy to participate in summer camps, like this. At training camps or in camps, I try to convince children that I’m not scary and I don’t need to be afraid to ask questions, because the worst thing that can happen is that I will not answer it immediately, but in a day or two. In general, many guys write me Vkontakte or e-mail how to solve this or that problem, and I am happy to answer them.
A: All in all, yes. There are guys from Belarus, such as Ivan Metelsky and Gena Korotkevich, who perform well in various competitions. Sometimes I consult with them, take an example in terms of strategic, tactical thinking. There is one wonderful person from Russia - this is Seryozha Kopeliovich, who also serves as a cool example for me of combining successes in olympiads and active, diverse personality development, because he is sociable, is interested in dancing and sports games - in general, he is a very positive young man .
A: I solve problems in C ++, I write some auxiliary programs in python.
A: When Yandex decided to open an office in Minsk, and this happened immediately after my third year, they came to us with a small team and began to conduct an interview, where they began to invite the strongest Olympiads in the first place. Accordingly, I and more than a dozen people who were actively involved in the olympiads passed the interview, were very pleased with us, and we can say that it was mainly the olympiads that made up the first staff of the Minsk office. Since then, of course, it has been replenished with various other developers and not only developers, even recruiters and other specialists. But the beginning of the office was laid precisely by the teams of the Olympic Games, so we can say that yes, the Olympic Games helped me.

A: There are, in fact, but they are not critical. As in any activity, some people vote for one method of development, and some - some other. Olympiad is characterized by speed and expressiveness in solving problems. That is, when there comes across some task that needs to be done, the Olympiad is more likely to start doing it faster so that she works, because he does it at all of his olympiads and, when he comes to work, tries to do the same there. However, this is not always good. Sometimes you need to think, plan, design, before you do. Most of these olympiadniki do not know how.
A: Now I lead a small project that is being done in Minsk. In principle, I like to combine the process of writing code with managing a small team, distributing small tasks to everyone and some kind of planning, but, unfortunately, recently it has become more and more go into the process of distributing tasks and planning and less and less. in the process of writing code, and I don’t like this tendency, because I can write code, I love it, I do it more or less well and I would not want to leave it for managerial and managerial activities. I hope that in the future I will also be able to manage some project, small enough, within the Yandex framework, in order to keep up with the work of the rest of the employees and write the code myself.

A: We are improving the background of the cards, i.e. what is used by other services: traffic jams, routing, panoramas and others. They use a basic map background, i.e. basic pictures of houses, streets and more. Recently, we are committed to improving the readability of this substrate. Our managers come up with how to make it even more visual, more understandable and convenient for use and orientation, and we are implementing this. In particular, at the beginning of summer we launched a project called “Landmarks on maps” and now we can look at some buildings on Yandex.Maps not simply: “But this is building number 25 of such and such a street”, but it’s written, that it’s a concert hall, movie theater or pharmacy.
A: Yes, I read. (Smiles)
A: I read Habrahabr in the Vkontakte feed. I am subscribed to the group and just look through the headlines that come across there and open interesting articles. Usually, some news about machine learning, python, and everything near-piton are interesting for me.
A: Забавный вопрос. У меня отношение в целом такое же, как к компьютерным играм. Это занятие, в первую очередь, зависит от самого человека: можно спокойно поигрывать в покер или онлайн игры в свое удовольствие, не тратя ни копейки, а можно и в каких-нибудь шашках или шахматах проиграть состояние. Игры, конечно, бывают более азартные или менее азартные, но все-таки степень пристрастия к ним зависит от человека. А что касается покера — эта игра имеет неплохую математическую основу. Не то, чтобы я призывал ее изучать, но играть в покер и понимать, что там происходит — вполне себе достойное занятие.
A: Okay, thanks a lot. If you want to ask something else, “interrogate” - contact (laughs).
Many thanks to MagisterLudi , my tutor in writing this article.
Most likely, many of you have heard about sports programming olympiads. In recent years, a lot of competitions have appeared on this type of programming. This is Google Code Jam , and Topcoder Open , and Russian Code Cup . Today I was lucky to personally chat with Roman Udovichenko (as part of AYcamp, under the special Sauron program ), one of those who achieved serious success in them. He lives in Minsk, last year he graduated from the Belarusian State University, works for Yandex. He told how he was preparing for the Olympics and how they helped him in life.
I ask all interested under cat.

Some successes of Roma:
- Silver medalist IOI 2007 and 2008
- Absolute winner of VKOSHP-2007
- Finalist of the student world championship ACM ICPC 2011
- Finalist of Topcoder Open 2011 and 2012
- Prizewinner of the Russian AI Cup 2012
- Finalist of the Russian Code Cup 2011, 2012, 2013
- Silver medalist of the student world championship ACM ICPC 2013
- Finalist Challenge24 2014
- Finalist of Google Code Jam 2014
Q: Roma, when did you start doing Olympiad programming?
A: I started doing Olympiad programming in fifth grade. We had different circles at school, including computer science. I began to go to him and soon learned to solve problems and began to participate in the Olympics.
Q: How did your parents react to your choice, did not blame you for spending a lot of time at the computer?
A: At first, my parents treated normally as a normal hobby, but they still were not allowed to spend time on a computer for a long time. For example, my mother set a limit so that I spent at the computer no more than one hour a day.
Q: How did your olympiad career begin?
A: At the circle, we studied the IntAl programming language, then very simple algorithms. But then the teacher saw that I was doing very well, and a year later I proposed to solve very simple problems of the olympiad direction, starting with the fact that to calculate the area of the rectangle on two sides and the others are very simple. Later, I went to the regional Olympiad and realized that it was very interesting for me and further began to solve olympiad problems and study algorithms.
Q: And when did you have a really strong joy from success at the Olympics?
A: Everything went smoothly at school: at first I went to the regional, then to the republican olympiad, a few years later to the training camp for the international olympiad and the international olympiad itself. Probably one of the strongest joys was when I took a first degree diploma at the Republican Olympiad and went to the training camp for the international Olympiad. Perhaps, when we reached the final of the programming championship in the third year.
Q: If you had the opportunity to return to the past, would you change anything in your training?
A: Good question. Perhaps I did not prepare enough for the last school international olympiad in the 11th grade, took a silver medal there, I was very dissatisfied with this. Probably, it was worth preparing more actively, but for various reasons I did not devote much time to preparation. Therefore, I only got a silver medal, although I had enough strength and skills, sort of like a gold one. Probably, this could have been somehow changed, but overall I am satisfied with myself.

Roma second left with silver at IOI-2008
Q: That is, you always aim only at the highest result, only at the first place?
A: Not quite like that: I try to more or less objectively evaluate my strengths and understand: in some situations I can count on victory, and in others I figure out where I can find myself, in which place, based, for example, on some general online workouts.
Q: How are you improving now?
A: At the current level, I do not really train much. Because I have already graduated from university, I am engaged in work and participate in competitions, so to speak, having what I have.
Q: And at what point did you most "pump" in terms of Olympiad programming? Was it a camp, a textbook, or something else?
A: It was Cormen’s textbook. Once in the eighth or ninth grade, I definitely don’t remember, I was not able to get to the training camp for the international olympiad, although I really wanted to. And then I had sports anger: “Damn, why, I can, I need it!”. Then my parents bought Cormen’s book, it’s such a healthy classic textbook on algorithms, and I began to purposefully read it throughout the summer.

The same book
Q: How is it worth starting an olympiad career?
A: If you really want to start doing Olympiad programming, then the educational process should be iterative: you try to solve a problem, you don’t succeed - you learn from senior comrades or teachers how it is solved. You learn something new, you try to solve new problems, again you don’t understand, and so on ... Such a practically theoretical approach should be alternated, because experience shows that if you just sit down on a textbook and start learning algorithms, and then try to solve problems, then most likely nothing will work out.
Q: How did you prepare for the Olympics in your school years?
A: School years ... In school years, I tried every day, in addition to lessons, to solve some problems. It took several hours a day. In total, approximately 20-30 hours per week along with weekends. Fortunately, we had a good director in our school who was glad that he had such a student in the school, and therefore allowed me to attend classes almost all year round, which I enjoyed. (smiles) Thanks to this, I was able to devote more time to training. Although I had no problems with visits: I finished school with a gold medal.
Q: How did you relax?
A: I loved and still love to play board games with friends, at school, for example, we loved to play Colonialists. In addition, they played in Munchkin and other classic ones. He also played soccer and volleyball, in the evenings he often went to the stadium.

Roma plays Magic: The Gathering
Q: And in my student years?
A: In my student years, everything was very complicated, because I really wanted to go to the finals of the World Cup, and there we trained for a while very hard, maybe even too much. There were days when we decided on two five-hour contests a day. When we wanted to go to the finals in the second year, we trained 40-50 hours a week, it paid off, but for some reason we still couldn’t go, but we succeeded in the following.
Q: As far as I remember, in your third year you did not speak very well, how so?
A: Yes, in the third year we took a place somewhere in the middle of the tablet. But I think it was connected with excitement. We were not able to cope with this feeling throughout the competition. All my thoughts were something like this: “Wow! Already everyone passes the tasks, everyone already has 2-3, but nothing works out for us! Panic, panic, panic - what to do? " This is unconscious, but very difficult to concentrate.
Q: You were in Los Angeles on Google Cod Jam just a week ago, are you satisfied with your result or could you be better? And how did the CIS act as a whole?
A: CIS performed well, many guys at the top of the table. I took 10th place, not because I did not come up with a puzzle, but because of a small ideological error. To be honest, I’m very disappointed to realize that I came up with how to solve, but I did not use the right approach.

left: Roma, Andrey Malevich, followed by a Google employee
on the right: Gena, Dmitry Egorov
Q: And which tour was the most difficult and do you have any algorithm in solving problems?
A: Yes, probably there were none. I try to solve tours without undue stress: if at some point there is not enough effort to get to the next round - so be it. What about the solution algorithm: I try not to chase complex, overwhelming tasks, but strive to more confidently score points on more accessible tasks for me.
Q: You said that you are trying to participate in various qualifying competitions and, if possible, go to the finals. But does your olympiad career interfere with work?
A: No, it doesn’t interfere. There are a lot of Olympiadniks in Yandex, both former and current, so we don’t have this: “Do not go to competitions, sit, write the code at work” (smiles)

Before the beginning of the Code Jam
Q: Yandex and ABBYY organized a wonderful camp, it’s really cool here. You came here as a teacher, do you like it and what drives you internally? If it weren’t for your job at Yandex, would you be willing to spend all your time teaching children?
A: I really like to teach children, this is one of my favorite activities in life. Unfortunately, in our country it so happens that teachers are not paid very high salaries, so I am not ready to devote myself completely to teaching. I also like programming, so I want to work in some large company, do some interesting projects and get a good salary. Of course, I also really like to teach children, so I am happy to participate in summer camps, like this. At training camps or in camps, I try to convince children that I’m not scary and I don’t need to be afraid to ask questions, because the worst thing that can happen is that I will not answer it immediately, but in a day or two. In general, many guys write me Vkontakte or e-mail how to solve this or that problem, and I am happy to answer them.
Q: Do you want to equal someone?
A: All in all, yes. There are guys from Belarus, such as Ivan Metelsky and Gena Korotkevich, who perform well in various competitions. Sometimes I consult with them, take an example in terms of strategic, tactical thinking. There is one wonderful person from Russia - this is Seryozha Kopeliovich, who also serves as a cool example for me of combining successes in olympiads and active, diverse personality development, because he is sociable, is interested in dancing and sports games - in general, he is a very positive young man .
Q: And in what language do you program mainly?
A: I solve problems in C ++, I write some auxiliary programs in python.
Q: How did you get on Yandex and did the Olympics help you?
A: When Yandex decided to open an office in Minsk, and this happened immediately after my third year, they came to us with a small team and began to conduct an interview, where they began to invite the strongest Olympiads in the first place. Accordingly, I and more than a dozen people who were actively involved in the olympiads passed the interview, were very pleased with us, and we can say that it was mainly the olympiads that made up the first staff of the Minsk office. Since then, of course, it has been replenished with various other developers and not only developers, even recruiters and other specialists. But the beginning of the office was laid precisely by the teams of the Olympic Games, so we can say that yes, the Olympic Games helped me.

Q: Is there any discomfort or disagreement between the olympiadniki, like you, and some ordinary developers?
A: There are, in fact, but they are not critical. As in any activity, some people vote for one method of development, and some - some other. Olympiad is characterized by speed and expressiveness in solving problems. That is, when there comes across some task that needs to be done, the Olympiad is more likely to start doing it faster so that she works, because he does it at all of his olympiads and, when he comes to work, tries to do the same there. However, this is not always good. Sometimes you need to think, plan, design, before you do. Most of these olympiadniki do not know how.
Q: What can you say about your work in Yandex and what you see your career in the IT industry in the future?
A: Now I lead a small project that is being done in Minsk. In principle, I like to combine the process of writing code with managing a small team, distributing small tasks to everyone and some kind of planning, but, unfortunately, recently it has become more and more go into the process of distributing tasks and planning and less and less. in the process of writing code, and I don’t like this tendency, because I can write code, I love it, I do it more or less well and I would not want to leave it for managerial and managerial activities. I hope that in the future I will also be able to manage some project, small enough, within the Yandex framework, in order to keep up with the work of the rest of the employees and write the code myself.

Roma at work
Q: What project are you doing at the moment?
A: We are improving the background of the cards, i.e. what is used by other services: traffic jams, routing, panoramas and others. They use a basic map background, i.e. basic pictures of houses, streets and more. Recently, we are committed to improving the readability of this substrate. Our managers come up with how to make it even more visual, more understandable and convenient for use and orientation, and we are implementing this. In particular, at the beginning of summer we launched a project called “Landmarks on maps” and now we can look at some buildings on Yandex.Maps not simply: “But this is building number 25 of such and such a street”, but it’s written, that it’s a concert hall, movie theater or pharmacy.
Q: Are you reading Habr?
A: Yes, I read. (Smiles)
Q: What do you read and what do you find there useful?
A: I read Habrahabr in the Vkontakte feed. I am subscribed to the group and just look through the headlines that come across there and open interesting articles. Usually, some news about machine learning, python, and everything near-piton are interesting for me.
Q: Keep this bonus question: Your attitude to poker and how this game “pumps” the brain, is it worth it to include it in the curriculum, can you learn something from this?
A: Забавный вопрос. У меня отношение в целом такое же, как к компьютерным играм. Это занятие, в первую очередь, зависит от самого человека: можно спокойно поигрывать в покер или онлайн игры в свое удовольствие, не тратя ни копейки, а можно и в каких-нибудь шашках или шахматах проиграть состояние. Игры, конечно, бывают более азартные или менее азартные, но все-таки степень пристрастия к ним зависит от человека. А что касается покера — эта игра имеет неплохую математическую основу. Не то, чтобы я призывал ее изучать, но играть в покер и понимать, что там происходит — вполне себе достойное занятие.
Q: Рома, спасибо тебе за интервью, успехов в будущем и читай это интервью на Хабре!
A: Okay, thanks a lot. If you want to ask something else, “interrogate” - contact (laughs).
Many thanks to MagisterLudi , my tutor in writing this article.