2012年10月19日星期五

如何在TopCoder上修炼?

转自Quora的解答,感同身受。自己过去10年没有修炼,现在开始十年之后是否可以真的突破现在的自己呢?!
Question:

How should I practice so that I will be at a level where I can approach TopCoder's Div1-500 problems with confidence?

Edit

Best answer:
Nikhil GargSolved some problems on Topcoder

Impatience is a vice, young Jedi. Let's take it slow, shall we? 

  • First thing, learn how to write a hello world program. This is the easiest part.
  • Then start solving div2 easy level problems (250 points usually). They only test if you can translate the simplest of the ideas in code or not. Unless you can solve any such problem in score >= 240 on any given day, you just can't translate your ideas into code. Keep practicing.
  • Now you know how to code a little. Time to learn some algorithms. Read Topcoder tutorials - they're an excellent resource - solve all problems linked. Read topcoder forums and get used to the ecosystem. Study some basic algorithm techniques like Dynamic Programming and divide-and-conquer. Study Graph Theory, some Combinatorics and some Number Theory too, all this while solving problems on Tocoder and elsewhere. You can find all the knowledge on internet easily. 
  • If you've reached this stage, you know how to write code and you know enough of basic algorithm theory. Topcoder div1-500 problems are often very tricky, before you start solving them, you should be able to solve div2 250, 500, 1000 and div1 250 point problems.
  • Make sure you code everything. Solving a problem theoretically is nice and cool but don't stop there, code it and make sure it passes system test.
  • Once it does, remove all the code and start from scratch. Re-write all code. Get it right in first go. See how much your time improves.
  • Start reading codes of all the top guys - which basically means all reds and targets and several yellows too. These guys are smart and there is plenty you can learn from their code.
  • Go through editorial of each problem that you solve (or can't solve). They often come with great insights and alternative solutions etc.
  • Don't get used to solving easy problems. It's a common pitfall. Always solve problems tougher than what you can solve - that is how you learn.

And when you've been doing all this for a while, you're ready. Soon you'd find you're solving more and more div1-500 pointer problems. Practice is the key from now on. 

What we (my ICPC team) did in particular was - maintained a spreadsheet of our Topcoder practice record. We decided to do div1-500 pointers of all matches from 300 onwards. So once you start a match, make sure to finish its problem, even if you've to see editorial after struggling for hours. Be persistent and don't give up. 

How long do you take before you achieve your goal and how much time you must put in, these are highly subjective questions with no definite answer. It all varies on your speed and ability to grasp. I know it sounds cliche but believe me this is the only correct answer. 

Good luck young Jedi, may the force be with you!

PS : You might also be interested in Pradeep George Mathias's answer to Algorithms: What is needed to become good algorithmist like top rankers in Topcoder/Spoj/GCJ?

没有评论: