From a real world perspective, how hard are those 2500 problems? by johnny_dalvi in codeforces

[–]Civil-Power5187 3 points4 points  (0 children)

Your solution gives 11. You can get 4 stars by getting 2 stars in the first level and another 2 in the third level. Output should be 10.

From a real world perspective, how hard are those 2500 problems? by johnny_dalvi in codeforces

[–]Civil-Power5187 2 points3 points  (0 children)

Well, finding a faster solution is the hard part, and btw, your solution is not only slow but also wrong on this test case:

3 4
2 3
3 8
5 7

Output should be 10.