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

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

http://codeforces.net/contest/185/problem/E

problem description doesn't mention what to output when there is no solution:

for example:

2 0

1 0

2 0

what's the output to this samples?? 0.5 or 1 or no solution.. problem description doesn't mention it at all...

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

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

and I have another samples

2 2

1 0

2 0

1 0

100 0

from AC code answer is 1.

but according to problem description I think correct output is 49

because (1,0) and (2,0) can't gather together directly because their parity is different,we

must transfer from (1,0) to (100,0) both (2,0) and (100,0) are even distance.

so 49 is correct answer,but from judge it is 1, problem description is wrong.

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

    It seems that the unit can stop after it reaches the target cell, so the parity does not matter. But yes, it is not explicitly mentioned in Russian statement either.