My code was giving correct output for all inputs when I give them manually. But its showing WA when I submit my code.
Please tell me If I’m doing anything wrong.
https://ide.codingblocks.com/s/55966
This is my code link
Giving WA for KQUERY
Try test cases from SPOJ tool kit, if u are submitting it on SPOJ.
if same problem exits on hackerblock then mention the link of problem.