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
Thanks for the help in advance !
Input:
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
Thanks for the help. Logically yes the answer should be 5 but I don't know why it's showing the output to be 0.
Maybe we shouldn't assume that exactly one coin is incorrect.
"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