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

Автор Axelius, история, 8 лет назад, По-английски

Hello guys , ============

Firstly I would like to wish you all Happy New Year.

I am facing some problem in this question

https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=606

I would really request if some one could provide me some tips on the question.

My code that got WA is this

https://ideone.com/LiUclc

Thanks for the help in advance !

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

»
8 лет назад, # |
Rev. 3   Проголосовать: нравится +4 Проголосовать: не нравится

Input:

1
6 2
2 1 2 3 4
=
2 2 3 4 5
<

Output:
0
Answer:
5
Checker Log:
Wrong answer expected '5' found '0'

Your output: 0
Correct output: 5

UPD: Udebug says your output is correct, I don't know why though,
The first weighing means that the first 4 coins are correct,
The second weighing is between [2 3] and [4 5] , 2,3, and 4 are correct coins. which means that 5 is incorrect. Please correct me if I am wrong

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

"Print a blank line between datasets." I would suggest you to use uDebug: https://www.udebug.com/UVa/665, a very nice tool for uva problems