carrots - bradendubois/competitive-programming GitHub Wiki
Solving for Carrots
ID: carrots
Difficulty: 1.3
CPU Time: 1 second
Memory: 1024 MB
Solution
The solution to this problem is trivial, but the presentation of this problem is interesting, because it's a great exercise in learning how to actually identify the problem itself, reading between the lines to find the important parts. It's easy to get lost in the 2 blocks of text and descriptions of the data and miss that the solution is already given to you: output P, the number of carrots handed out, which is the second number on the first line of sample data; all other data is totally irrelevant.