Can anyone tell me what’s wrong with my solution CodeChef: Practical coding for everyone to the problem TLG Problem - CodeChef?
It fails on the testcase:
4
17 33
26 60
34 32
27 22
(the answer should be
2 50
)
Edit:
See my answer here.
5 Likes
Oh! i understood the question wrongly. I fixed it and now it works with your test case too but for some reason it is still not accepted.
https://www.codechef.com/viewsolution/28458850
1 Like
It seems to fail on the following testcase:
(the answer should be
2 435084
)
1 Like
Yeah it works now. Thanks! I changed all the
short ints
to ints
. I should be more careful with these things.
1 Like
Why it should be 2 50 …?
maybe i misinterpreted the question
Its largest cumulative lead. You need to find the sum of scores till that point and find the max difference.
1 Like