This time in June Cookoff (https://www.codechef.com/COOK107B?order=desc&sortBy=successful_submissions) I noticed that 3 out of 5 problems use dynamic programming at its core. I am learning basic dynamic programming from past one week but still, I am not able to crack the cookoff questions. I googled similar problems but was only able to find similar problems which were not much similar to get an AC. This sometimes demotivates me and forces me to think “Beta Kuch bhi karle jab lode lagne honge to lag ke rhenge”. Ab is samsya ka kya samadhan hai?
Dynamic Programming is a difficult topic to master and you have given it only a week. There are people who have practiced around 200 - 300 questions on dynamic programming and still get stuck. Don’t feel demotivated. Just keep practicing and you will eventually be able to solve these questions.
To learn DP, firstly practice standard DP questions like knapsack, MCM, LCS, LIS, e.t.c. Then solve question from a2oj DP problemset. There are many more resources available on the internet as well.
solved 4/5 by brute or simple logic. First understand if the problem really requires DP or not…Also please refrain from discussing during contest.
This will help you a lot…
“dynamic programming at its core”
First things first , it makes 0 sense to discuss a problem or rant about it during a contest . Secondly certainly first 4/5 problems of Div 2 dont use dp . Thirdly and most importantly start practicing and stop Writing about in the MIDDLE of a contest about it and @awaracoder has given u a fair amount of resources for the same.
you have shared a very important source , i didn’t knew about it . Thank you.
Here some must do dp problems. see the dp section basic and advance
Samasya ka samadhan is read editorials after contest then you will realize what was the expected approach
But I think it was not a great contest as usually 4th question of cook off involves some good DS or algorithm.
Which are the 3 out of 5 questions that used DP…?
Last 3 problems. I know that these can be solved using another approach (if you are successful in coming up with it, I wasn’t). But as a novice to DP, I ask ain’t problems involving maximising and minimising aren’t meant to be easily be solved using DP?
problem 3 was a greedy approach question