MrNull's blog

By MrNull, 10 years ago, In English

I'm getting Wrong Answer on 2A problem while I can't find any bug in my code! plz don't say write in another way, I want to find bug of this code! my submission is 10922088

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

| Write comment?
»
10 years ago, # |
  Vote: I like it +2 Vote: I do not like it

A simple test that shows your algo is wrong:

3

nima 7

nima -3

you 4

your code says you are winner but its wrong

when you update your ans its posibble that someone get much score but in next round gets a big negative score and in this case you dont update your ans and winner

right code: 10976660

  • »
    »
    10 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    but in your test my program says that nima(with is correct) is winner! I said plz don't say other ways. I want to debug this one!

    • »
      »
      »
      10 years ago, # ^ |
      Rev. 2   Vote: I like it +2 Vote: I do not like it

      sry it was wrong in typing

      3

      nima 7

      nima -4

      you 4

      it isnt other way . it shows your wrong in algorithm and forgeting update in some cases

      • »
        »
        »
        »
        10 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        also In these test it says correct one(nima)!

        • »
          »
          »
          »
          »
          10 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          But it should print "you",shouldn't it?

          • »
            »
            »
            »
            »
            »
            10 years ago, # ^ |
            Rev. 2   Vote: I like it 0 Vote: I do not like it

            don't think so! in problem statement says "First one who reached the maximum score" ;) maximum score is 7 which nima reached it first. good luck :D