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

Автор HarshaNadendla, история, 4 года назад, По-английски

Hlo!

Problem : https://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://codeforces.com/contest/1056/submission/82889004

Plz help me out. Thanks!

  • Проголосовать: нравится
  • -13
  • Проголосовать: не нравится

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

the third line of the inputs are different!!!

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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 ?

    • »
      »
      »
      4 года назад, # ^ |
      Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

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

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        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 :)