I'm a total beginner to competitive programming and the subtasks are way over my head. So it would be appreciated if any body could take some time out and help me in understanding the sub tasks in the most easiest way possible. Example : https://www.codechef.com/problems/CATSDOGS Subtasks 
1 ≤ T ≤ 10^4 0 ≤ C, D ≤ 10^2 2. Subtask #2 (30 points) 1 ≤ T ≤ 10^5 0 ≤ C, D ≤ 10^3 3. Subtask #3 (50 points) Original constraints asked 29 Sep '17, 20:29

You are missing out certain cases. answered 29 Sep '17, 21:00

As you want an explanation about subtasks , I am not going into the logic or solution to the problem itself , and writing only about how the subtasks and points system works. In general , subtasks are nothing but sets of constraints on the minimum/maximum values of the variables defined in the problem. In simple language , for the given problem , you will get 20 points if your program can show correct answers within the time limit when the value of T is between 1 and $10^4$ , and C and D are between 0 and 100 . You will get 20+30 points if your program can handle both this and larger values of T , C and D as mentioned in subtask 2, and will get 20+30+50=100 points if it can show correct results for all the three sets of constraints How can a code pass one set of subtasks and fail others ? As the constraints increase , your code might show wrong answer due to some faulty logic , or some variable overflow. The algorithm might not be optimized enough so it might exceed the time limit for larger constraints. Basically what it means is that only a correct answer to the problem is not enough for 100 points , your answer has to be scalable and optimized in order to get 100 points. How to make your programs scalable and optimized ? That is the whole point of competitive programming. You will have to read up extensively on data structures and algorithms , understand what sort of logic to use where , etc. All of this will come from practice and study. I hope I was of help , if anything is unclear comment and I will try to help you out as good as I can :) answered 30 Sep '17, 02:56
