Блог пользователя zzzzsust19

Автор zzzzsust19, история, 14 месяцев назад, По-английски

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
  • Проголосовать: не нравится

»
14 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
14 месяцев назад, # |
  Проголосовать: нравится 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.

»
14 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
14 месяцев назад, # |
  Проголосовать: нравится +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)