Los_Angelos_Laycurse's blog

By Los_Angelos_Laycurse, history, 8 years ago, In English

http://codeforces.com/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...

| Write comment?
»
8 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

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.

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

    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.