"I'm in awe." Those were the words used by TopCoder member Insight in describing ahyangyi, one of the newest "targets" in algorithm competitions, and the first ever high school student to achieve such status. His rating graphs show steady improvement over the course of his time at TopCoder. Without a doubt, he has made his mark in regular TopCoder algorithm competitions as well as TCHS competitions. In addition, he has achieved red status in both tracks, which is something that only a handful of competitors have been able to accomplish.
You might think that all this success came easily for ahyangyi. But the truth is that he has put a great deal of work into reaching his current level, typically practicing 20-30 hours per week, and sometimes over 40 hours.
In this interview, we'll get a chance to learn more about this incredible competitor and how he reached this remarkable achievement. He'll also share some of his practice tips and offer helpful advice for members looking to improve their rating.
What is your name?
My name is Yang Yi.
How did you get started in programming?
When I was in primary school, I began experimenting a little with BASIC by copying code down to my computer and examining the program output. Later on, I learned the LOGO language at my school. LOGO is very funny; and I found myself spending a lot of time with it. After winning the LOGO city competitions for primary school kids, I decided to keep on programming and learn about Computer Science.
How did you get started in programming competitions?
As I mentioned above, there was an annual LOGO competition in my city. However it didn't involve real coding because it was an exam on paper.
Besides this one, my first "real" programming challenge was the NOIP (National Olympiad in Informatics Partitional). I took part in it in the year of 2001.
How did you learn about TopCoder?
I dreamed of having a frequently held competition. TopCoder realized that dream. TopCoder competitions provide me with an excellent way to practice, compete, compare myself with others, see how I am improving, and so on.
Which do you like the best, the TCHS competitions or SRM's, and why?
The TCHS competitions, because the problems are easier to solve.
How did it feel to win SRM 345?
It was very, very surprising. I did the 250 and 500 point problems quickly, and was very lucky to find a simple challenge case that many people didn't care about (3 chests, each with 3 stones). With it, I got 250 challenge points, and those points allowed me win to the SRM.
I used to think I must finish all the problems, correctly and quickly. But I didn't solve the 1000-pointer in SRM 345, so it was somewhat magical to win that contest. That fact that the challenge points made the difference made it really magical.
How important do you think math skills are to doing well in SRM's?
Math skills (including graph theory, algorithms, number theory, etc.) are half of programming. Coding is the other half.
What is the hardest TopCoder problem you have ever solved during a competition?
I can't remember. It seems that I rarely do the problems nobody else can solve (i.e. I can only solve easier problems.)
How do you prepare for an SRM?
I'm not so strange. However, I usually stop working on other things several hours before the SRM (which helps ensure that I won't get too tired during the SRM). And I usually keep every program closed during the contest, except the arena (how can I compete without it?).
How many hours do you spend practicing each week?
I'm not sure. Sometimes 40 hours or more, but sometimes no practice at all (like this week). If you want an average time, maybe it's 20-30 hours per week.
Did programming always come naturally for you or did you struggle a lot at first?
Both. I saw programming as a kind of "playing" when I was young because I felt it was very interesting. And I spent much time on it. Being a middle school student, I found there were many things to learn before I could master programming. So I then worked hard on things like algorithms, data structures and so on.
When practicing, do you use practice problems from TopCoder or do you use problems from other sites (UVA, SPOJ, etc.)?
I used to use ZJU (http://acm.zju.edu.cn) to practice (WishingBone was the Administrator). However I prefer the sites like URAL (http://acm.timus.ru ) and SGU (http://acm.sgu.ru). To Petr's fans: there are 2 challenges of his at the http://acm.sgu.ru site. I also use SPOJ. I did a few problems from UVA, but the number of problems in UVA is so huge…
Did you have any teachers that helped you to develop the skills needed for programming competitions, or did you learn mostly on your own?
Yes I have a teacher, but I learned more by myself than from my teacher. And the help from my friends (for example, Tang Wenbin, see question 20) has been really great.
When practicing, what methods do you use? Do you just try to solve all the problems in a TopCoder practice room, do you target specific skills to practice (DP, geometry, etc.) and find problems that deal with those specific skills?
I usually don't spend a lot of time on extremely hard problems because failing on a problem which doesn't look doable will just make me very frustrated. On the other hand, I used to try to do all the problems I could. That way, I could improve all kinds of coding skills. However it takes time. So I gradually switched to only doing the problems that look useful for helping me improve.
Usually, I don't try to do problems pertaining to specific knowledge. But I will do so after learning something new, to help develop that skill.
If you've done other programming competitions, how do they compare with TopCoder?
OI challenges and SRMs are of quite different styles. Maybe the major similarity between them is that their problems are usually very algorithmic. However, OI emphasizes the ability to think out a complex algorithm and realize it, while SRMs are more about coding speed and precision.
Compared with ICPC-style challenges, SRMs are a mini version of ICPC. But SRMs aren't judged during the challenge (a bit like OI), and they have the "Challenge" phase, which makes the challenge more exciting and dramatic.
In your opinion, what are the most important skills someone needs to do well in TopCoder SRMs?
First, the coding precision. I mean, the ability to get the code to really work. Without the correctness, none of the other skills really matter.
Then the algorithm ability and the coding speed are both useful. One reduces the time in thinking, and the other reduces the time of coding.
And another useful skill is the debugging skill. It not only reduces the annoying time of debugging, but also strengthens your performance in the Challenge Phase. However I am not good at challenging (except for the magical SRM 345).
When doing an SRM, do you always open the problems in order (i.e. easy, medium, then hard) or do you sometimes open the problems in a different order?
I always open them in order. Maybe opening them in a different order is a good strategy. However, I usually need some warmup before doing the 500 pointer or the 1000 pointer, and the 250 pointer is a great "practice". Opening problems in order isn't always the best choice, but often it is.
Of course, sometimes the "easiest" problem is actually hard. If I find I can't solve this problem in time, I may switch to the next problem.
What are your plans when you finish high school (what areas do you plan to study in college)?
I haven't thought about it very much. I have another year before I finish high school. So I can think more about it in the future. I will probably go into Computer Science.
What interests do you have outside of TopCoder (i.e. do you play sports, what music do you like, do you have other types of hobbies, etc.)?
I like many kinds of sports, but am good at none of them.
Who has been the single most important influence on you?
Tang Wenbin (OpenGL). He introduced TopCoder SRMs to me (although I registered before, I didn't realize what SRMs were like). In the year of 2006 we practiced together in a team named "Himalaya Zerglings" (with Zhu Chenguang), and we took part in many ICPC-like challenges, including the IPSC 2006.
What advice do you have for lower rated TopCoder members on how they can improve?
Do you get nervous before SRMs and what methods do you use to stay calm?
Doing SRMs is a very good way of practice. Because of their high frequency and the method of calculating rating, everyone can experience success and failure in these challenges. And most of the SRMs are not decisive (in terms of drastically affecting your rating or having to achieve some rank to qualify, as with the ACM-ICPC regionals, for example), so why should I feel nervous before them?
However, some SRMs do make me nervous. For example, at the time of SRM 352, my rating was 2993 and I was a little nervous to be so close to becoming a target. And I also got a little nervous in the Online Round of the TCHS tournament.
Maybe it's the "side-effect" of being under 18, as I don't get any cash prize from the SRMs. So whether it's a money challenge or not doesn't have much effect on me (however, in the money challenges I often face more powerful opponents).
What is "the method used to stay calm"? If you think you're nervous, you'll find yourself really nervous. It's just a psychological state. I think the best way to stay calm is to try not to think about being "nervous", but just focus on the problems.
How does it feel to be a "target" and one of the top ranked competitors in the world?
It's glorious for me! I'm very happy to join the targeteers. Maybe I'll drop below 3000 soon, maybe not. But that's not important. Becoming a target proved my skill in the SRMs. It also proved I can do something well after some hard work and failure. Because I can do well in SRMs, I may also be able do other things well. That's a great benefit to my confidence in doing anything.
However, doing SRMs isn't everything, that is, I still have many things to do. While I'm good at coding and thinking the algorithmic problems, I may be not so good at other things. The target means I did well, but what I need is to be even better at other things.
What are your long-term goals with programming competitions?
Programming competitions are so much fun, and they increased my interest and knowledge in Computer Science. That may be the most important advantage of Programming challenges. I hope I can go abroad by taking part in one of the big tournaments, as that would be a great experience for me.
Besides SRMs, I may try other challenges (Design/Development/Studio/Blog/…) in the future. Each challenge will have its own joy, and it would be better if I can do something different.