duddo's blog

By duddo, history, 10 days ago, In English

Hi,

I'm going into grade 11 this fall and I have started to find competitive programming interesting. I try to participate in contests but I can't even make it past the first question on codeforces. It makes me feel so dumb.

I want to get good at this and I have been reading multiple articles on the internet (what prefix sum is, prime factors, sieve, binary search, etc) but whenever I go into these contests I stumble on all questions. Please give tips on how I can get better at comp prog. When I try to practice, either questions are too easy or too dumb. And I just don't know how I'll get better at this.

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

»
10 days ago, # |
  Vote: I like it -18 Vote: I do not like it

You can try Luogu, which has many high-quality problems

»
10 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Why are all the people so mean! Why the downvote?!If you don't like it at least move on. You don't have to crush other people. And my answer to the question: I am a newbie too and I felt the same for a very long time. But I asked a lot of experienced people about it and embraced the fact that this is quite ordinary. There is nothing wrong with it. The advice I got was to solve educational codeforces rounds and read the editorials for math-based and constructive problems. This way, over time we will eventually get better at it.

»
10 days ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

I recommend that you go to usaco.guide and progress through the various topics in bronze: they have multiple practice problems by topic at the end of each lesson. Doing the last 5 years of USACO problems also helps. CSES also has some nice problems by topic and the CP Handbook is really useful(100% should read through it)

»
10 days ago, # |
Rev. 3   Vote: I like it +1 Vote: I do not like it

My advice as someone who became a pupil in roughly 1 year:

  • You don't want to have a good idea without knowing how to implement it. Practice implementation.
  • Make sure you know some math, mostly number theory. You don't need to know too advanced math topics.
  • When practicing, don't just read the editorial without really understanding it. Spending some more time on the understanding solution will be worth it.
  • this chrome extension is helpful. It shows you how many problems you've solved in a certain area. So if you see you've solved very few problems with tag binary search, you can go to problemset and use filter to see binary search problems.

I think that with these you can achieve a rating of at least $$$1200$$$. Later it's just learning new things and practicing I guess.

»
9 days ago, # |
  Vote: I like it 0 Vote: I do not like it

I've a question for you. Have you tried to solve a problem with pen and paper before coding? It helps me a lot. Majority of A,B problems are solvable using basic math. Consider the problem A from the Educational Round 133. Now, if you solve this problem by hand for $$$n\in {1,2,3,4,...,10}$$$, you should notice that answer is $$$\lfloor\frac{n+2}{3}\rfloor$$$ for $$$n\ge 2$$$ (For obvious reason $$$n=1$$$ is corner case). Now, you just have to convince yourself that it is indeed right answer (Simple proof by induction). So my advice is to make sure you REALLY understand problem before coding anything.
In my honest opinion, the only thing you needed in order to make first four problems from yesterday's contest is knowledge of dynamic programming and that's all.

Also:
»
9 days ago, # |
Rev. 5   Vote: I like it +3 Vote: I do not like it

go to the problemset tab -> sort questions by the amount of people who have solved them -> go from top to bottom and skip the ones you are stuck on for more than 30 minutes. After a bunch of problems, you almost definitely won't have issues with Div2A.

Also take part in Div3 contests, the first several questions there are usually easier than in div2

»
9 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Just solve and practice more problems, do some harder ones. Give yourself 20 or so minutes to solve without looking at editorial. Once you can solve 800 >75% of time in under 10 minutes, do 900s or 1000s, and slowly work way up to harder problem. If you are struggling with div2 contest, wait till div3 or div4.

I also was very bad at comp prog when I started, but I have improved using these strats, hope they help you as well.