Please read the new rule regarding the restriction on the use of AI tools. ×

MaouNournar's blog

By MaouNournar, history, 6 months ago, In English

I'm getting wrong answer on test 10 here's my submission https://codeforces.me/problemset/submission/2/252596846 If someone could at least give me a simple test that will "hack" my submission so at least i could follow it I can't even read the 50 lines that getting wrong answer on test case 10. Thanks in advance.

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

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I believe you're not handling this case: when a user reaches the winner score in the middle of the game but isn't the actual winner, you're announcing him as the winner

  • »
    »
    6 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Could you give me an example e.g a test case

    • »
      »
      »
      6 months ago, # ^ |
      Rev. 3   Vote: I like it 0 Vote: I do not like it

      you should have used i.e

      6
      a 5
      a 5
      b 10
      b 1
      a 1
      b -1

      • »
        »
        »
        »
        6 months ago, # ^ |
        Rev. 3   Vote: I like it 0 Vote: I do not like it

        My code output is b it sould be a right? Oh i understand now i announce the one as the winner as soon as he hit the score and not calculate if he loses score after I will work on it thanks alot .

      • »
        »
        »
        »
        6 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        thank you for test case