### zzzzsust19's blog

By zzzzsust19, history, 2 months ago,

Problem: 1624F - Interacdive Problem. Submission: 191765637. I am testing test cases offline, my answers are correct. However test cases show wrong answer on the first case. And it doesn't even let me know what is wrong with my answer or what my output is. Who created these dogshit testcases

• -11

 » 2 months ago, # |   0 This is not my first interactive problem. I know how to solve them
 » 2 months ago, # |   0 Issue resolved. New Submission: 191766450 Turns out using "fflush(stdout)" wasn't enough. I had to manually add endl instead of "\n" after every line I printed to get my submission right, and also removed "sync_with_stdio(false)", don't know if that has any impact tho. I have never faced this type of issue with any other interactive problems before. Dogshit experience overall.
 » 2 months ago, # |   0 This problem probably got rated 2000R for that alone. Half of them couldn't figure out why they were getting wrong answer
 » 2 months ago, # |   +6 You are not initializing variable ans in your code, so it can have any value (and that value can differ when you run your program locally and on the server). And in the first test ans's value isn't changing throughout the execution, because the answers of interactor are ascending, therefore there is a junk in ans after the while cycle and the answer in first test can be wrong (and it is on the server, as you can see)