zzzzsust19's blog

By zzzzsust19, history, 21 month(s) ago, In English

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

  • Vote: I like it
  • -11
  • Vote: I do not like it

»
21 month(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

This is not my first interactive problem. I know how to solve them

»
21 month(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

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.

»
21 month(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

This problem probably got rated 2000R for that alone. Half of them couldn't figure out why they were getting wrong answer

»
21 month(s) ago, # |
  Vote: I like it +6 Vote: I do not like it

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)