lukasP's blog

By lukasP, 11 years ago, In English

Over the last year I have been writing a Guide to Programming Contests, which is supposed to contain most of the information needed by a successful competition programmer. A possible subtitle could be "Everything you need to know to become a better competition programmer (except algorithms)", because I will not write about algorithms. I decided to present it to you, even though it's not finished.

Here is a link to the main page.

So far, I wrote most material in the section How to get better?, where you can find a full training program for improving your programming skills.

There is a lot of content missing, but I decided to already show it to you to get some feedback. I'll post updates in this thread when I write a new section or chapter.

Please tell me what you think is missing and what you don't like! However, my goal is not to write about algorithms, there are already plenty of books and courses that do this.

  • Vote: I like it
  • +86
  • Vote: I do not like it

| Write comment?
»
11 years ago, # |
  Vote: I like it +4 Vote: I do not like it

The content is really nice. I enjoyed reading it.

Could you explain in more detail why it is better to debug by printing instead of using the debugger?

  • »
    »
    11 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    Because your teammate can code another problem while you are reading your solution

  • »
    »
    11 years ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    One of the reasons was already mentioned by dalex but the other reason is that often while debugging on the computer you end up simulating the whole computation step by step and that is very slow.

    This is one of the parts that I wanted to expand, thanks for the question.

»
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it

about vim page: you don't really need user mouse in other editors.

end, shift + home, ctrl x, down, ctrl v

will do. (still longer but a lot quicker than with mouse)

  • »
    »
    11 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    You probably missed this sentence: "Or you can press Home-Shift-End to select a line instead of using the mouse."

    • »
      »
      »
      11 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Oh, sure. I should read more carefully:)

»
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I'm a beginner in programming . I've started coding @ codeforces about 50 days ago. I've a total of 185 submissions and all the problems I've done by my basic programming knowledge because I don't know much about different algorithms , data structures etc.. which can be one of the reasons why I'm not able to submit more than one question in the contests @ codeforces . Now what can be the suggstion for me . Whether I should continue the way I'm going or I should first of all learn algo then return back to coding..

  • »
    »
    11 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Mainly practice solving problems on your own and study some algorithms on the side. You are only competing for two months and comparing yourself with people who compete for 10 years. You will get there.

  • »
    »
    11 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    I would recommend USACO training page (http://cerberus.delos.com:790/usacogate), which guides you step by step through algorithms... It begins with easy problems and easy algorithm, and at the end you'll learn more complicated algorithm, but most important is that in every section you have to read tutorial about algorithms that you are going to use solving problems in that section.

    • »
      »
      »
      11 years ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      Oh yes, I forgot to mention USACO. That has a good balance between solving problems and learning new topics.

»
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Thanks a lot @ lucasP . I'll surely follow your suggestions.

»
11 years ago, # |
  Vote: I like it +4 Vote: I do not like it

are there any suggestions for Game Theory? any good books ... thanks in advance

»
11 years ago, # |
  Vote: I like it +23 Vote: I do not like it

Recently I found a new way to improve debugging skills, code reading skills and corner-case thinking skills. Which I will look at other's solution (possibly correct) and found what is wrong with it. CodeForces is a very great platform to do this, I can just click into solutions that is judged incorrect, and find out what is wrong.

In ACM-ICPC, when a solution got a WA it is always unsure that whether it is the case that the algorithm is incorrect, or there is a bug in the code. Sometimes I need to read my teammates code, understand what he is doing and figure out what's wrong. My goal is improving those skills will help out in this situation.

  • »
    »
    11 years ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Yes, also in TopCoder you can go to practice rooms and do the same.

    Btw, if you are still in Stockholm, we have a training tomorrow :)

»
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it

What about your thoughts the approach to individual training? E.g. time to spend on a problem before reaching for a solution, topic-based or problem set based training, etc.

  • »
    »
    11 years ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    You should do more topic-based training in the beginning, especially when you are trying to learn new algorithms and techniques. For example you can spend a week only doing dynamic programming problems.

    As you become better, I would personally do less and less topic based training.

»
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Oh yeah I have something to tell you as a feedback:

yo forgot to close an opening bracket :D

here

http://contest-wiki.csc.kth.se/index.php/How_to_get_better%3F#Motivation

XD

»
11 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Great content! Thank you for sharing! I have a question similar to visila, how much time would you recommend to spend trying to solve a hard problem before reading an editorial?

  • »
    »
    11 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    I think this varies from person to person. I often thought about some hard problems for a week before giving up. Sometimes your unconscious is working on a problem and you solve it in the shower.

    You should try thinking about a problem for a few days before giving up and see how it works for you. It worked for me at least.

  • »
    »
    11 years ago, # ^ |
      Vote: I like it +7 Vote: I do not like it

    Once I have been solving one problem for about a year :-)

    • »
      »
      »
      11 years ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      have you eventually solved it? or you read the editorial?

      • »
        »
        »
        »
        11 years ago, # ^ |
          Vote: I like it +13 Vote: I do not like it

        I've solved it myself without editorial.

    • »
      »
      »
      11 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      That's really too much of patience...#Respect...:) Btw, which great problem was that...?

      • »
        »
        »
        »
        11 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        The problem looks like this: given an array with n elements (n ≤ 5·104, ai ≤ 109). In each step we should find minimum (from all minimums we should find median by position) and remove it from array. After each step need to print position of found element.

»
11 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Thanks for all the great questions so far!

Now I know what topics I should improve in the write-up and it also shows that my effort is of use for a lot of people.

»
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Absolutely amazing, I've been looking for some advices and ways to get better a long time ago. I stuy a lot, but I think I don't have a systematic and efective way to do this, so I spend most of my time going on the wrong way. I'll for sure follow this advices and try to organize my schedule and methods to study. Thank you very much lukasP

»
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Thank you very much!

»
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Very nice material. Good job.

»
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it

thank you very much for great wiki.

»
11 years ago, # |
  Vote: I like it 0 Vote: I do not like it

lukasP the material looks great, thanks for generous sharing. I definitely would like to see more.

»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Page not found

»
6 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

[deleted]