CPFAQ: A Topcoder Chat with Petr Mitrichev

Petr Mitrichev

I’m working on a project this year to build a competitive programming FAQ. This is one in a series of articles describing the research, writing, and tool creation process. To read the whole series, see my CPFAQ category page.

On September 20, 2008, Petr Mitrichev took part in a Topcoder Spotlight Session where he answered questions from competitive programming enthusiasts. I ran across a reference to this session on Quora while researching another topic and thought it would make a good addition to my current series on how top competitive programmers practice.

The transcript below is an edited version of the original. I included just the questions that Petr answered directly, and I rearranged the chat order to put his answer directly after the corresponding question. I also fixed spelling, grammar, and word choice, and converted textspeak to standard English. I left in the original user handles, which should help if you want to find something in the original chat. I hope my edited version captures the essence of the original while being easier to read.


towelenee: What should we read to become a good coder?
Petr: How do you define good coder?
towelenee: Someone like Burunduk1.
Petr: Do you mean good at solving algorithmic competition problems? Then you should practice.
CONDOR_316: Are there any books that will help? Other than Cormen?
Petr: I don’t think so. Books are good as references when you can’t solve a problem. Not as textbooks.
cpphamza: I understand.


cpphamza: I totally agree that practice is the strongest factor. Can you tell us how long have you practiced on solving algorithmic problems?
Petr: There’s a story about that in TC features. In short, since 1997. :)
Petr: My biggest increase in skill was at the Russian IOI preparation camps.
cpphamza: I’ve read that, but I’ve heard that you stopped practicing a while ago, so from 1997 till when?
Petr: I mostly stopped practicing after I entered university in 2002.
Petr: And I completely stopped practicing after going to the second ICPC final in 2005.
cpphamza: Is this because you think there isn’t much more out there to study/practice?
cpphamza: I mean can you explain why you stopped practicing 3 years ago and you still ranked number 1, given that many people are practicing hard.
Petr: Well, I wouldn’t state it that sharply.
Petr: I’d say that I’ve stopped practicing because 1) There turned out to be a lot of competitions taking place, so just participating in them provides plenty of practice. And 2) Practice itself provided too little fun for the time spent.
Petr: I still participate in every SRM and in the Russian Open Cup (~8 ACM-style competitions a year).

Work vs. competition

espr1t: And did starting work affect your competition skills in any way?
Petr: It made me write several SRMs in Java :) Other than that, I don’t think there’s any influence.

Russian IOI training camps

cpphamza: You said that your largest skill boost was in the IOI camps. As far as I know, camps are about 1 week of contests/lectures. I don’t know about Russian camps specifically, but I’m wondering how they affected you so much in that short amount of time?
Petr: Well, it’s 2 weeks twice a year. Each day has a 5-hour contest and a lecture from the top competitors from past years who are now teachers. Often the day’s contest is based on the previous day’s lecture, so you remember it better. I know it sounds really simple, but it seems to work.

Easy problems vs. hard problems

espr1t: Do you think it’s better to practice solving a larger number of easier problems (which helps improve coding skills) or fewer but harder problems (which helps improve thinking skills)?
Petr: I think a mix is better. But when you can’t solve a problem, don’t just skip it. Learn what you’re missing.
Petr: I think coding skills should come automatically sooner or later. So I’d go for the thinking part.


oa12gb: Is it better to know more algorithms or just know a few and practice them well?
Petr: I think it’s best not to separate learning algorithms from coding them. It’s better to try solving problems related to an algorithm to learn it.
oa12gb: Then learn by solving, not reading, and from the analysis of the problem I can learn even more.
Petr: Yes, but I’d even emphasize that by writing the solution yourself you learn even more, even after reading the analysis.


CONDOR_316: How important is math in solving problems and practicing?
Petr: I don’t know because I don’t know how it is not to know math. :)

What’s going on here?

martins256: What’s going on here?
petar1: Petr is answering our questions :)
jay23jack: Really? Where is he?
petar1: Here in the room :)
Petr: In Moscow.

Failing to solve an easy task

oh_No: Sometimes I can’t solve an easy task (like generating permutations) but can solve a hard task (like DEV 2 1000, which is hard for me). Do you think this is a general problem? How can I overcome this?
Petr: Read the analysis after the match, and write the code. If the analysis doesn’t make sense, search the Internet and/or books.

Understanding the problem

oa12gb: Sometimes, like in the last SRM, I can’t understand the formula in the analysis so I can’t code anything. In the 1000, for example.
Petr: You can try asking on the forums then. There are always people willing to explain.

Age, and online judge problems

jay23jack: How old are you?
Petr: 23.
jay23jack: How young! I thought you were older.
MB__: Which online judges do you like to do? Which were you doing when you were starting to learn?
Petr: I’ve never solved more than 5-10 problems on any online judge.
MB__: Wow.
samshu: Just one year older than me, and Wow!!
cpphamza: Yea, I’ve noticed that you’re simply not on the rank lists of any online judge! Can you explain that?
Petr: I learned too late about online judges.

Practice schedule

MB__: How were you practising before? Doing old ACM problems and math?
Petr: Solving contests prepared for us by our coaches. When in high school, 3 problems for 5 hours. When in university, ACM-style.
MB__: 3 problems for 5 hours, that’s almost 15 problems a day :D
MB__: Were you practising once a week only, or very often?
Petr: It was different throughout the year. Two times we had 2-week long camps for the best Russian high schoolers, where we practiced each day. During other times, I practiced very rarely.
MB__: I see. I was thinking before that you were practising a lot.
Petr: 2 weeks from 9am to 7pm is a lot :)

Dynamic Programming

tharis: Is there any kind of trick for DP problems, something that we could look and say, “Probably the DP relation is this type”?
Petr: No, DP is probably the best example that only practice can help. There’s no trick, just the ability to notice patterns.
tharis: Thx…. Guess I’ll have to practice much more.

Am I too old to start programming?

samshu: Do you think that 22 is too old to start programming?
Petr: Tourist is red and was banned from TC for some time for being under 13. :)
Petr: Dunno. I think not, especially if you have a technical education.

Google Code Jam

Nikaustr: Did you take part in this year’s Google Code Jam?
Petr: I’ve prepared some problems for it. :) Did you like the one about triangle of the given area? ;)


ahm.kam_92: You work in Google, right?
Petr: Yep

Natural talent

samshu: Do you think programming comes naturally?
Petr: No, I don’t. It’s a skill.

How long to work on a problem

CONDOR_316: How long do you think a beginner should spend trying to solve a problem before looking at the solution? Say a DP problem.
Petr: As long as it’s still interesting for you. When you become bored, chances of inventing a solution lower significantly.


ahm.kam_92: What country do you work in?
Petr: Russia.

Introduction to Algorithms

Tavo92: What book would you recommend about algorithms? I know that “Introduction to Algorithms” is very good.
Petr: I have no other recommendation. That book is good for sure :)

Algorithms at work

Nikaustr: Do you use much of your algorithm skills while working at Google? I mean you do solve problems very well, but sometimes tasks can be far from the TopCoder SRM format.
Petr: Algorithm skills come from a different angle. You rarely encounter maxflow or something like that.
Petr: But general ability to design and write a program that solves a given task, sometimes solving some logical puzzles on the way is important. I’ve coded Aho-Corasick once :) (at work)
Nikaustr: ??? really??
Nikaustr: What was the situation?
Petr: can’t say :)
Nikaustr: Aah, OK :)


ahm.kam_92: What do you work on?
Petr: Can’t say :) I’m working on improving search quality.

Topcoder SRM

MB__: Will you start in this SRM?
Petr: Yes, I will participate in the SRM.

IOI camps

oa12gb: In the IOI camps you were in, do you think the more useful thing was the old coders who gave you lectures or the problems you solved?
Petr: The problems.

Reading vs. solving

Tavo92: What do you think is better, to solve a lot of problems or to read a lot? Or the two of them together?
Petr: I think it’s better to solve problems, and to read how to solve one when you can’t invent a solution by yourself.

Personal life

vlad_D: Do you have a gf?
Petr: I’m married.
vlad_D: Kids?
Petr: Not yet :)
cpphamza: Were you married when you came to Banff this year?
Petr: No, but I was with my wife-to-be :)

Target rating

MB__: What’s the best thing to do to get from 2300+ to target?
Petr: That’s a tough one. I think accuracy is crucial at that point.


Nikaustr: I plan to finish my PhD, learn a couple more algorithms, and try applying for a position at Google. Where do you work, by the way? I think I’d like to go to Pittsburgh.
Petr: I work in Moscow. Never moved in my entire life.
Nikaustr: Oh, oops :), I thought you were in America :). Work in your home-city…. Hmm, that sounds great! :)

Topcoder Division 1 1000 questions

yiuyuho: Do you find the Division 1 1000-point problems more/less difficult than problems appearing elsewhere?
Petr: I think they are quite specific, given the timeframe here at TC.

Topcoder ratings

samshu: How do you interpret TopCoder ratings as (Grey=?,Green=?)
Petr: They are for comparison, absolute values don’t make much sense.

Learning to solve hard problems

igi: I really like to practice, but when I am solving a harder problem, I think about it for an hour or so, and then I usually skip it because I don’t know what to do. How can I overcome this?
Petr: Try to read the analysis, understand the solution, and then (important!) code it.
igi: But after all this thinking and without results I lose my will to even look at it anymore.
Petr: Then you should look at the analysis earlier when you only start losing your interest :)
igi: Haha :D

What to study

pcaldeira: If you had 3 months to prepare yourself for an important contest and had low skills on pretty much every type of problem, what would you spend more time on? I heard DP and graphs are the most important skills. Should I make those a priority?
Petr: I think DP is the most important one, both at Topcoder and in ACM.
Petr: But it’s the hardest to improve on :)
pcaldeira: Ok, what about IOI level?
Petr: IOI, in my view, is really random.

Role models

SwitchCase: During your younger years as a programmer, there must have been times when you looked up to someone and wished you were like them. Who was/were they and what things did you do specifically to be such a great coder?
Petr: Most of the people I wanted to be like were just better programming competitors.
SwitchCase: No one specific?
Petr: Nope.


rajeshsr: What do you think made you what you are now? Do you consider practice as a very important thing?
Petr: Yes, it’s surely the most important thing.
Petr: But of course one should not underestimate my teachers.
rajeshsr: Any strategy of practice you followed?
Petr: No – back in my day we didn’t practice by ourselves.
Petr: We basically solved contests that were prepared by our teachers.


vlad_D: What’s your aspiration in life?
Petr: Just to live a good and interesting life, and try to make it better for my loved ones.


yiuyuho: Who were all your teachers, besides andrewsta?
Petr: KOTEHOK, max_b, Victor Matyukhin, many others.

Computer school

towelenee: Have you been in LKSH [lksh.ru, a summer computer school]?
Petr: Yes, 2.5 times.

Concrete Mathematics

imrankane2005: Could you mention a good math book for ACM preparation?
Petr: Maybe Concrete Mathematics by Knuth et al.?
jbernadas: My brain has a hole in the math section, and I want to fill it. Is Concrete Mathematics a good book?
Petr: I think it is, but I’m not sure it’s a cure-all.
jbernadas: But it is a good start, right?
Petr: One thing that is absolutely crucial is to be able to think ‘mathematically’.
Petr: I’m not sure how you develop that.


martins256: What do you do on your free time? What are your hobbies?
Petr: Soccer, cross-country skiing, movies. The usual ones :)

Getting hired

samshu: Did Topcoder ratings matter to Google when you joined them?
Petr: I don’t think so, but being a winner of Google Code Jam did matter.

Topcoder challenge phase

CONDOR_316: How do you manage to challenge so many in the challenge phase? Is it understanding of the problem or experience?
Petr: Maybe it’s because I’ve taught high school students for some time.
Petr: And learned how to spot mistakes.


samshu: Any reason why you’ve selected C♯? That’s really odd.
Petr: Because it prevents me from making stupid mistakes.

Russian IOI training camps

leadhyena_inran: I think a lot of people are interested in your practice regimen. Can you go into detail on that?
Petr: Sure.
Petr: When I was in high school, I practiced for 2 weeks, 2 times a year at Russian IOI preparation camps.
Petr: The daily schedule was: 9am-2pm contest, 3pm-7pm lecture.
Petr: I attribute most of my progress to those camps.
Petr: These days, I just solve contests, and that gives me enough practice.
leadhyena_inran: What kind of reading and curriculum did you have at the camps?
leadhyena_inran: And did you use online judges a lot?
Petr: We didn’t have much reading, because there was no time for it.
Petr: We just used our scribes from lectures.
leadhyena_inran: A lot of it was note-taking… interesting.
Petr: The curriculum was rather straightforward: graphs, some algebra, DP, etc.
Petr: I didn’t go much into online judges.
Petr: Because I learned about them too late.

Practice vs. talent

leadhyena_inran: So, what do you feel makes for a great coder? Is it internal talent or practice, or a combination, or something else entirely?
Petr: The honest answer is: I don’t know. But I have a feeling that practice is more important than talent, but of course the combination is best.
leadhyena_inran: Interesting… do you do better with more practice? is there a point of diminishing returns?
Petr: I think I’ve gotten to that point. That’s why I haven’t been practicing for the past 2-3 years.
Petr: But I think that at least for yellows, they’re not there yet.


leadhyena_inran: Do you consider yourself a fast coder? Do you think typing speed is important?
Petr: No, I don’t think I type fast. But I think it’s important to be able to type blindly, not to make stupid misprints because of looking at the keyboard and not at the screen.
Petr: Especially in TC.

Topcoder challenge phase

leadhyena_inran: I can agree with that. A lot of people still talk about some great challenges you’ve made in the past, like the TCO2008. Could you tell us your challenge technique?
Petr: They are two completely separate ones.
Petr: 1) I know what I’m looking for – most often the bug that caused me to resubmit. Then I just think of a ‘keyword’ to look for.
Petr: 2) If I don’t have any specific bugs to look for then I try to choose a solution that is simple enough and try to spot logical errors.
Petr: I rarely notice misprints or suchlike. Like “this problem requires long longs, but the DP array is of ints, so challenge.”


tharis: Do you and tomek get on well? :p
Petr: Sure, but we don’t meet much.
Petr: I bumped into him when I was in Mountain View in August.
tharis: Ok, lol :)

When did you start?

leadhyena_inran: At what year in your life did you start coding? When did it become a calling?
Petr: 1997 – I was 11.
Petr: I became addicted when I started winning.

First computer

leadhyena_inran: And your first computer? For me it was the TI994A… :) shows my age
Petr: It was a 80486 one with Windows 95 installed from floppies.
Petr: It was an award at All-Russian Olympiad.
Petr: Before that, I practiced at the local education center.


litwin: What editor are you using? vim?
Petr: Visual Studio.
tharis: Which OS (if Linux, distro) do you use?
tharis: And IDE?
Petr: Windows, Visual Studio.
Petr: At work – Linux, Eclipse.


antonov: How do you debug while competing in TC?
Petr: Using Visual Studio step-by-step debugging capabilities.
antonov: Whenever I use that debugging technique, I can’t settle my bug when looping too deep, especially memoization!
antonov: How to solve those bugs?
Petr: Set breakpoints to some obvious invariants failing.
antonov: How can we know where to set breakpoints? It may be too deep inside the the memoization. Stepping may cost much time to find out!
Petr: Well, you should try to understand what breaks in your solution, and set breakpoints there. Like ‘this array is OK at the end, but that is not, so let’s see when the wrong value gets written to it’.


leadhyena_inran: That’s cool… so your math talent also contributes to your coding skill?
Petr: I think my ‘mathy’ thinking contributes a lot, because logical puzzles are often an important part of algorithmic problems.
Petr: All my education was in Math, not CS, so I can’t say much about whether CS education helps more.
leadhyena_inran: Also many are asking you what other math competitions you’ve been in.
Petr: I’ve participated in the All-Russian Math Olympiad, but wasn’t even close to get to the IMO.
tanmoychatterje: Any particular math book you consider as Bible?
Petr: No.
Soyoja: So. You have a mathematics master’s degree?
Petr: Yes.

40 Facts

kazakoff: Do you know about 40+ facts about you? Can you comment on it?
Petr: Some of them are funny :)

Time management

leadhyena_inran: I understand that you’re employed, with family. Does your work schedule and family interfere with TC? How do you schedule yourself?
Petr: TC doesn’t take much of my time.
Petr: We’re allowed to do TC while at workplace.
leadhyena_inran: That’s something I wish could be adopted EVERYWHERE.
Petr: And my wife understands that TC is very important to me.
Petr: So I rarely have a scheduling problem.
Hornax: How many hours of practice does ROI or VKOSHP need?
Petr: As many as you can afford :)


libe: Did you get a PhD?
Petr: No.
libe: Do you have a plan to get PhD degree?
Petr: I’m not sure.

Taking a break

glue2glee: What would you tell someone who is feeling he is stuck, and feeling he is is not learning anything new? What if he doesn’t have any good coach, or summer camps? And feeling so talentless and confused?
Petr: Maybe take a break from solving problems? You won’t get far if you’re not excited about it.

Contest vs. work programming

igi: Does it help you a lot on your work, all this knowledge in solving and experience from CS contests?
Petr: Yes, it does, but not directly.
Petr: Ability to write simple and working code is priceless.
igi: Is your job exciting as SRM?
Petr: It’s exciting, but in another sense.


pt1989: Do people with no exposure to IOI/IMO training have any chance against those who do?
Petr: I think yes. They do.

Favorite programming language

libe: What is your most favorite programming language?
Petr: I have no preference.
Petr: Whatever does the job.


rem: Before submitting a solution, do you usually test it only on samples, or create your own tests also?
Petr: Only samples in most cases. Some TL testing if I’m worried about it.
Petr: I do most of the testing after submit. That’s why I resubmit often :)

Problem writing

AnilKishore: Has being a problem writer helped you much?
Petr: I’m not sure.

Jobs at Google

amrsaqr: I have a brother who works in application support. Does he have a chance to work in Google? If yes, does he have the chance to switch to programming inside Google?
Petr: I’m not sure about that. He’d better check what vacancies are open at Google. When inside Google, you can switch positions provided you qualify.

Hardest competition

tsalman: Which programming competition was hardest to you?
Petr: It depends on the definition of ‘hardest’. IOIs were hard because I wasn’t able to solve most of the problems.


martins256: Have you done any IQ tests? :)
Petr: No.
skaterdude69: What is your IQ?
Petr: Dunno.

Learning without coaches

sam14871: We don’t have very good coaches to guide us toward the coming contests (e.g., regionals). How could we guide our team the best way, do you think?
Petr: Participate in online contests probably, and take part in discussions of problem solutions.

Logical thinking

sam14871: Do you think the problems nowadays require more than just learning algorithms and their tweaks? If so, what other fields (e.g., math maybe) do you suggest for learning to do better these days?
Petr: Logical thinking (you can name it math, but it’s really only the basis of math).

The brute force approach

igi: I think I’ll study CS, but I am thinking, hey, what if it’s too boring, what if I’ll have to 8-hour type some code that can be considered brute force, if you know what I mean?
Petr: I don’t think that happens often. Most of the time, you can invent a way to avoid such ‘brute force’.


igi: How much is a good coder paid?
Petr: I don’t think we should discuss that.

Esoteric languages

kcm1700: Do you know how to use “BrainF–K” or “WhiteSpace” programming language?
Petr: No.


tsalman: Do you think having a good mentor can make a difference? :)
Petr: I’m not sure, as I haven’t seen any ‘mentor-mentee’ pairs in programming contests.

Planning vs. coding

pdallago: Do you write everything on paper first, or just the main ideas? How do you know when it’s time to switch from thinking to coding?
pdallago: Are you still thinking about the problem while coding, or do you try to write down everything first?
Petr: I still think about the problem, and that bites me sometimes. But I think that I win in speed in the end.
pdallago: I guess he means he wins in speed by starting to code earlier.


antonov: Before coding, do you try to find out all bugs in your algorithms? Have you ever fallen into cases that when debugging, you realize your solution is wrong?
Petr: Yes, that happens sometimes.
antonov: Is it best for us to double-check our algorithm before coding, though it may waste some time, but ensure better results?
Petr: You should try that and see if it helps. I don’t do that, but that may be my mistake.

Clarity of thought

pt1989: Is clarity of thought more important that considering multiple approaches simultaneously?
Petr: I think yes.


Hornax: What type of training is good if my region doesn’t have special schools or clubs (with math or CS profile)? Only online contests or something else?
Petr: Online Contests, TC fora.

How long to work on a problem, part 2

kolistivra: How long should we wait until we look at the solution to a problem that we can’t solve? How long should we think about the problem?
Petr: Until you get bored. (During practice) During contest: until you run out of time :)


stjepan: How good are you at math? Do you have similar successes in mathematics?
Petr: No, I don’t have any achievements in math.

Hard problems

_sunny: What was the toughest SRM problem for you?
Petr: I don’t remember anything specific.

Typing speed

cpphamza: How come you win in speed given that you said you are not a fast coder?
Petr: I said that I don’t type fast – but typing is minor here at TC. Being able to write good code from the start is much more important.

Coaching others

jbernadas: Any recommendations when training other people?
Petr: Prepare a lot.
Petr: Because it’s easy to get into a situation when you’re explaining something too difficult.
Petr: And thus are not really explaining, but more talking to yourself, and nobody will understand you.
Petr: I’ve gotten into that situation frequently.


batiestuta: How many hours of practice per week?
Petr: Just SRMs and sometimes other online contests.

Real-world coding

leadhyena_inran: I was going to ask you personally about your normal coding experience away from TC for a moment. When you do coding at work or at home, what’s your preferred language, IDE, environment?
Petr: I get enough coding at work not to do it at home.
Petr: At work, I use C++/Java in Eclipse, or in vim for fast patches.
leadhyena_inran: How about unit testing? Are you a proponent?
Petr: We do a lot of unit testing at Google, and I like it.

Human languages

karpio: What human (not programming) languages do you know?
Petr: Just Russian and English.


dan19: Do you play chess or the game of Go?
Petr: Both, but as an amateur.
yazhini: Do you play Age of Empires?
Petr: No.


Hornax: Who’s your “main trainer” in your opinion? (Now and in the past).
Petr: My teacher in Moscow 57th School – Alexey Gorodentsev.
Petr: Oh, I’ve read ‘math trainer’.
Petr: In terms of programming trainer – I don’t know. They all contributed a lot.

Working at Google

L: What are you working on at Google?
Petr: Improving search quality. Can’t say more.
leadhyena_inran: Do you do a lot of architecture as well? Application design?
Petr: No, most of the design is for back-end modules. I don’t do any UI.
Petr: Architecture – yes.
Petr: But there’s a lot of ready solutions that can be easily adapted at Google.
leadhyena_inran: Has the Google philosophy influenced you a lot there or have you brought your own philosophy to Google?
Petr: Google has definitely influenced me a lot. I wasn’t very ‘industry-ready’ when I arrived there.
pt1989: Do you like the food at Google? lol
Petr: A lot.
pt1989: Do you like to stay at your workplace indefinitely?
Petr: No, I love staying at home as well :)
ferrari_purav: So how is life at Google?
Petr: It’s cool.
leadhyena_inran: Would you have tried to work at Google had it not been for TC?
Petr: I don’t know. They won me when they opened an office in Moscow.
pt1989: Do you hate Microsoft?
Petr: No.
Phiber_Optik: Did you get to meet Larry or Sergey?
Petr: I’ve never tried to, but I think it’s not impossible.
pcaldeira: Do you enjoy working at Google? Doesn’t industry work bore you sometimes, when compared to contests like TC?
Petr: Working at Google brings another excitement, not quite the same as TC brings.

Changing jobs

tanmoychatterje: Would you shift to Microsoft if they offered you a better pay package than Google?
Petr: Microsoft doesn’t have R&D in Moscow (AFAIK).
tanmoychatterje: If it opened then would you consider it as an option? Microsoft or any other company for that matter?
Petr: Well, pay is not the only thing that matters. I’m not sure if they could create such a good work environment there. But I could consider changing jobs if they did.
superkinhluan: Would you consider moving to the States to work?
Petr: No. I didn’t like how people that move to States live there. Europe is possible, but I don’t think it will ever be States.
superkinhluan: What makes you not like States?
Petr: I’ve just talked to other Russian people that moved there and I don’t think they’re happy about that, for my definition of happy. The environment is too different and sometimes hostile.

Math Olympiads

fadetoblack: Have you participated in math Olympiads?
Petr: Yes, my best achievement is 7th place at All-Russian Olympiad.

Too many awards?

Hornax: What do you think about “star disease”? You have so many awards =)
Petr: It’s better spotted from outside.

Is Topcoder still interesting?

nigulh: Do you find TC algorithm problems still interesting, or are they too simple and just speed-typing?
Petr: They are interesting indeed. I still spend most of the time thinking, not typing.


pt1989: What movies/music do you like?
Petr: I’m mostly your average consumer there – I don’t have any ‘taste’ to them. I just like them when they’re good.

Topcoder SRM

L: Will you win this SRM? ;)
Petr: Of course.
rem: What is better to drink before SRM, tea or coffee?
Petr: Tea.
abhicool: Why not coffee?
Petr: Dunno. Mostly because I feel like tea just now :)
nigulh: When do you sleep, when competition is 4AM (or 5AM)?
Petr: I try to go to sleep at 8pm.
ferrari_purav: Has there been any occasion lately where you haven’t been able to solve a problem?
Petr: Sure, check my SRM history.

This chat was held on the day of SRM 418. Petr placed 2nd, after ACRush.

The meaning of life

kolistivra: What is the meaning of life?
Petr: It may be 42.

Favorite algorithm book

Amtrix: What is your favorite algorithm book?
Petr: CLRS.


tck: How many hours do you sleep per day?
Petr: 8.

Moscow State University

fadetoblack: Is it very difficult to study in MSU?
Petr: No, it’s rather easy.

Wrapping up

Petr: OK, thanks for the chat everyone, I’m sorry for not answering most of the questions.
Petr: But I’m a slow typer.

(Image credit: Nishant Arora)