whats wrong with my code..PROBSET? It is showing wrong answer.

https://www.codechef.com/viewsolution/19954315

Parts of your code is redundant, for example, your k will never reach m, including a safety break is pointless. t–>0 will always act the same. That aside, you’re not properly adding newlines to your code, which will ensure a wrong answer. You’re not checking for weak vs. fine properly, your control structure is virtually undecipherable (don’t use ifelseif/continue/breaks/gotos which don’t fit properly).
The logic is that if for a correct answer, any tests fail, the test is invalid. If a test is invalid, it CANNOT be anything else.
Then comes the check for weak, a check is weak if and ONLY IF, 1) the test is not invalid 2) wrong answers are shown to be valid.
Finally, we come to the the case of fine, which is easy, a check if fine if and ONLY IF 1) it is not weak 2) it is not invalid.

Have a look at this: https://www.codechef.com/viewsolution/19954741

Is it okay now…https://www.codechef.com/viewsolution/19956059
But it is still showing wrong answer.

//