I hate being the guy that spams questioning blogs but... On the problem, Did We Get Everything Covered?, I did the solution but in reverse kind of. Just look at my code and you'll see what I mean, but something is wrong. What?
Code
Edit: I failed test case 140 in test 2.
Took me way more than I'd like, I wasn't able to find any error on the logic, because it's right!. I even had to bruteforce getting the test case to find out the problem and it's absolutely silly.
If the answer is NO, you also need to print a string of length n
And you aren't doing that because of your return.
I wanna cry
I'm dumb asf, I can't wait till I get better at debugging(or just not making these dumb mistakes in the first place) any tips on that?
I don't know either, I spent around an hour trying to come up with a test case or find where it was failing but I couldn't. At the end I surrendered and got the test case from the problem.
You can make a submission that outputs the test case 140 so you can see it. Just to be clear, the logic should be something like if the number of test cases is bigger than 140, dont print the output, just print the test case you are interested in.
But isn't that test case hidden behind the "..."?
Example of how to do that: 283950709
2 2 1
a
your code outputs
NO
b
while the correct output is
NO
bb