Doubt in Forest_Gathering problem (May Challenge 16)

problem

my solution

I am getting stucked in task 3 of 1st subtask . I have tried a lot during contest and now , but can’t find mistake. Plz help me finding the error.
Thank you !

try all these test cases-

3 50 50

2 5

2 3

50 1

o/p - 0

3 20 70

1 20

2 1

3 20

o/p - 4

3 60 40

30 1

5 5

1 30

O/P - 2

2 95 40

2 30

2 30

O/P - 2

why test Cases are not disclosed after the contest are over? and by the way,i did test my program for test Cases which u have and its giveing correct output but still i’m not able to get to do subtasks

Try this test case:


3 30 10
6 2
2 2
1 1

output->6

This will definitely help cauz i faced the same issue :stuck_out_tongue:

1 Like

still correct output but subtasks not done…(are we allowed to use emoticons?)

thanks bro , for finding the mistake :slight_smile:

i tried all ur test case and they are working fine !

The issue has been discussed here: Will CodeChef provide test cases - help - CodeChef Discuss

Different subtasks have different constraints. Try making test cases within the constraints of the subtasks that your code failed. You can try using other people’s code who got AC just to check if your program works on different testcases (for example, edge cases, large test cases, etc). If you get WA on a higher subtask with higher constraints, try checking for integer overflow. Good luck!