Getting 1 test case WA....tried various testcases manually myself

my solution:here

I got prompt “Access denied! You don’t have permissions for this page.” when clicking the link attached in your blog.

It seems that the problem is in an ongoing contest. If so, just be patient enough until the end of the contest if the issue causing WA is not obvious.

Best wishes,

me too facing the same issue.
tried every possible cases, but not able to pass the only first test case.

Can you access the problem now?.. I want to know where my solution is getting wrong because I myself tried like 10000 pairs of random testcases (using rand and srand) and my code worked fine.

The following is a test case for which you code fails to produce the correct answer.

800000000 2 60000 20000

Your code output is

40000 20000

The correct answer is

-1 -1

since both a = 40,000 and b = 20,000 are outside the range [1,10000].

Wrong Answer

Thank you for giving the test case…I modified the code now it is giving -1 -1 for that but still getting WA 1st test case.

Check my solution of the problem.


yes bro that was the catch actually
it was a really easy problem we just had to look carefully in the constraints
it took me a whole day to figure that out during the contest

bro include every thing in the constraint and for 1 it will be differnt