My code:
I have tried every single test case that come to my mind. But it still gives a WA.
I don’t know why.
Thanks for your help.
P.S.
If you see the code, there is a line that says “if(total<0)total=0;” that is for the case when the number of buildings is equal to 1 or 2, because that case gave the wrong answer for the code that i wrote, but after that it gives a wrong answer.
Please help.
And is there any way by which I can see the test cases that codechef enters to my code and further how do I think a test case that might be violating my code for future reference. Thanks…