LawlietYagami's blog

By LawlietYagami, history, 7 years ago, In English

Hi all, this is my first post so please be polite :-)

It's been around 3 weeks I'm actively solving problems. I'm able to solve around 5 problems a day (Level C and D) ( I spend around 1-2 hours for every problem [is it too slow? Eventually will it get better?] ). Most of the time I'm able to come up with rough idea/brute force to solve the question then nearly every time I miss some edge cases then again come back, make changes and submit, then get AC. I was wondering how I could possibly get better, since I'm able to only solve A and B problems in contest.

And also, I was wondering how many problems are others able to solve in one day? How do I improve the rate of solving problems?

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

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

I tend to solve 2-3 C-D problems a day, when I can. Looking at your submissions, you just need to practice implementation to make your solutions to A and B faster. At the same time it's important to learn classical algorithms I think, and your methods I guess will work in that sense too (if you can consistently work on C or D).

I wish I knew more classical algorithms myself :(

Don't be disheartened, it's usual to drop rating at the start. I myself think Codeforces should start their initial rating at 1200 not 1500. That is just my opinion though.

»
7 years ago, # |
  Vote: I like it +21 Vote: I do not like it

The way to avoid wrong submissions is to create a proof of your submission. You want to be sure that (a) it is fast enough, and (b) it is correct on all cases.

For the first part, you can do big-O analysis, and keep in mind a general idea of how many operations may be performed in a second. You are probably already familiar with this. As you get to more difficult problems, also be aware of which commonly used operations are relatively slow (for example, usage of sets and maps).

For the second part, you need a logical argument that covers all possible cases. It doesn't need to be a formal, written proof, but you should do enough thinking that you are fully convinced of your solution, and you could easily write down a formal proof. At first, you will make mistakes. You might think you proved something, but realize that the argument is faulty or that you missed a case. But, like anything else, it is a skill that can be developed over time if you learn from your mistakes.

Finally, an important thing to keep in mind is you should try to match the way you practice as closely as possible to a real contest setting. In contest, you will need to prove to yourself that your submission is correct, since you won't be able to rely on judge feedback. So you should do the same while practicing; really think about each submission and try to minimize the number of submissions before you get AC.