mari_kadi's blog

By mari_kadi, history, 23 months ago, In English

Hello !! I am kinda new to the field of CP, and I am honestly doing pretty good in terms of solving problems, but when it comes to contests, I take long time some times, I joined math Olympiads many times and have international ranks in it, so the first step of problem solving (the algorithm) don't take time at all ( 10 minutes in the worst cases), but I hardly ever turn my solution to real code quickly, and my codes are usually full of bugs, What do you advise me to do? Which type of problems should I work on more?

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

| Write comment?
»
23 months ago, # |
  Vote: I like it +9 Vote: I do not like it

Yoi should solve more problem

  • »
    »
    23 months ago, # ^ |
      Vote: I like it +2 Vote: I do not like it

    Thank you, and sorry for the voting if it's negative cause I made it unintentionally and have no idea on how to unconfirm it.

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

      Coding is the easiest part in CP, so you will be fine with some practice

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

        Thank you for your response I really wish that !!

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

In this case, I don't recommend starting with CodeForces. In CP, solving problems quickly is just as important as solving them correctly — so thinking about certain algorithms/techniques every time and thinking how to correctly implement them on the spot is generally not a great idea. So, a good thing to do is start with the basics.

For THEORY: A way to start is with GeeksForGeeks, as it has a lot of resources, plus some example code and about one or two solvable problems per technique/algorithm. Then, cp-algorithms, which is a bit more advanced, but has absolutely great resources (even for some correctness proofs — if you're into this kind of stuff) and about 10 example problems to solve on other sites using each algorithm. Finally, you may jump into anything you like — CodeForces, TopCoder, CodeChef, LeetCode... Sky's the limit!

Pro tip: CodeForces has a ton of blogs which can be found really easily with even google search! Some are informational blogs (about algorithms, concepts, chapters), others are request blogs (a question instead of an information/an answer). Be sure to check both the blog post AND the comment section in both cases! The comment section is often a gold mine!

Avoid reading editorials. If you did this, you might get the feeling of "Aaahhh, alriiiight, this is cool, wouldn't have thought of it, I'll remember the technique" in most cases... but you won't actually remember the algorithm for a long time. (Speaking from experience here!) If anything, better walk away from the problem and come back to it hours, days, even weeks later and try to come up with a solution again. It's only after hours and hours of accumulated hours of intense thinking that you should start considering checking the editorials.

(Ah, and don't feel down because of the huge number of algorithms! I even doubt any non-grandmaster knows all algorithms on cp-algorithms, let alone understand them! Just take your time and consider CP not a chore, but a lifestyle)

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

    Thank you so much for the useful advice, I really appreciate that !!

»
23 months ago, # |
  Vote: I like it 0 Vote: I do not like it

If you solve problems on your own, you will somehow progress

  • »
    »
    23 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thank you for advice !! Actually I kinda progressed and won good rank some contests ( unfortunately outside of cf cause the time is inappropriate) in div 4,3,2 I really had to practice

    • »
      »
      »
      22 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      try to solve a real round with the same results))

»
22 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hey, I see your submissions are uniform among all languages slightly tending towards python tho. Try to stick to a single language (C++ I'd suggest, it's the most preferred and best for long run).

Hope your handle sees many more colors this year!

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

    Hello Actually I study python and java at school ( mostly python ) that's why I use them. But since I reached IIOT I was advised to learn cpp so I work on it sometimes. Thank you for your nice advice!! I will do that !!