HarshaNadendla's blog

By HarshaNadendla, history, 5 years ago, In English

Hlo!

Problem : https://mirror.codeforces.com/contest/1056/problem/C

I am confused. For the same test case, how is it possible that the outcomes can be different ?

Here is the correct verdict an AC submission gets. How come the outputs be different when the turn = 1 in both the cases ?

Here is my submission....which is a WA. Submission link : https://mirror.codeforces.com/contest/1056/submission/82889004

Plz help me out. Thanks!

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

| Write comment?
»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

the third line of the inputs are different!!!

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

    hi abhayp001 yes that is what i am not able to understand. In both the tests, 2nd line(array elements) are same and the turn value is also same (turn=1). So if turn is 1, I will choose the max value in the array, which is indexed at 6. Why is it 6 in test #3 and 12 in test #5 ?

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

      it is possible that jury is not playing optimally he can choose any (not maximum) no. upd:- use a set

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

        yes abhay, i understood that jury can also play in non-optimal way. But here in both test #3 and test #5, the first turn is ours(not jury). So in both the tests, since I play optimally, I should choose 6. But why 6 in test#3 and 12 in test #5? Just check the first input value which the user(me) gives in both the tests.

        thanks for ur concern :)

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

          your programm is giving wrong output on 6 0 73 766 748 111 544 978 381 864 195 952 558 970 1 2 9 10 6 11 1 this

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

            2 is already taken by the jury but it is showing 6 12 10 8 2 3 output

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

              Thank you so much abhay. I got to know my mistake! Thanks a lot :)