Chef and Easy Queries: "WA" result in Sub-Task 1 (C language)

Hello, Guys.

I am getting result “WA” in Sub-Task 1. Here is my solution:

From what I read about “WA” (wrong answer) result it means that my response is not correct. But the test result is OK per the test input and output given in the problem page.

Here is the problem page:

Does anybody know what can be wrong with my code? I spent a lot of time trying to figure that out with no success.

Per problem statement, Sub-Task 1 is:
Sum of Qi over all test cases and days ≤3.10^6

But I sincerely did not understand that.

One more question. I noticed that all submissions are without comments. Is there a rule not to comment the code submitted?

No, it is not required to remove comments and then submit.
I submit with comments too

1 Like

Thanks for your reply.

I found out why I was getting WA in this code. It was because I was stopping getting the inputs when the first day wit less than k queries happened. By the problem statements you need to get the n inputs regardless of the result.

How to mark this post as resolved?