First of all we are sorry that it's too late.
Let me tell you a common problem I face in contests.
"I read the problem statement and I understand that pretty well. But either I don't know how to approach or I get stuck in fixing bugs."
Sometimes it takes more than an hour to fix the bugs and the contest ends.
This is a common scenario for beginners like me.
For a beginner normally there are 3 types of problems in a contest ( especially in onsite ones). (Maybe these are true for experts too :p)
- They understands the problem but can get AC because of lack of bug-free coding skills.
- They understands nothing of a problem.
- They understands well and get AC for 1-3 problems.
Now, let's talk about the second problem we face.
Only one thing can solve this issue.
- Solve more problems. :p
But the previous point is something that I hate a lot.
Why ? Only because it's not specific and descriptive.
I observed a lot of problems that made me cry during contests. Because I couldn't fix the bugs.
I spent a lot time during contests for stuffs like:
(Let I added using namespace std;)
- sort(v.begin(), v.end(), cmp) [ Failing to write a bug-free compare function :( ]
- Sometimes I stumbled writing greater<int>()
- What is the better choice: sort() or stable_sort()
- Should I use "*" or "->" to access key/value of maps/sets etc.
- What to use: lower_bound() or upper_bound()
- And a lot of more stuffs of STLs
- Codes that require prime, gcd, lcm, pattern etc. This is a good problem for beginners. Besides, I failed to solve this because I constructed edges in O(N^2) :p Funny right ? I wouldn't miss it if I could solve some good problems that require prime, prime factorization etc.
- Problems which talk about an algorithm or data structure. Many times you need to understand that algo/ds but you cannot use that algo/ds to solve that problem . You have to utilize the idea behind that algo/ds and discover a new technique ( maybe something that is of lower complexity ). I missed this because I failed to understand the concept of LCS (Longest Common Subsequence) .
To solve these types problems, I suggest solve 100-200 Codeforces Div 2 B.
Actually Div2-B's are the problems that are set to test those skills.
But sometimes C's are also good for this.
And in addition Topcoder Div2 250 pointers are awesome.
- Don't leave a topic without acquiring enough knowledge. You should learn tremendous coding skills on sort(), compare function, lower_bound(), upper_bound(), iterators, nested-STLs, struct and other stuffs following C++ Reference.
- Solve 100 CF-Div 2-B . Track your improvement.
I am sorry if these tips are extremely poor. I welcome you to contribute to this. Let me know if you have any thoughts. Thanks :)