why in the second testcase the answer is not ...XXX http://codeforces.com/contest/104/problem/D

Reminder: in case of any technical issues, you can use the lightweight website
m1.codeforces.com,
m2.codeforces.com,
m3.codeforces.com.
×

# | User | Rating |
---|---|---|

1 | tourist | 3645 |

2 | Radewoosh | 3403 |

3 | Um_nik | 3348 |

4 | LHiC | 3336 |

5 | Benq | 3316 |

6 | V--o_o--V | 3275 |

7 | mnbvmar | 3241 |

8 | yutaka1999 | 3190 |

9 | ainta | 3180 |

10 | Petr | 3106 |

# | User | Contrib. |
---|---|---|

1 | Errichto | 191 |

2 | Radewoosh | 177 |

3 | rng_58 | 164 |

4 | PikMike | 161 |

5 | Vovuh | 160 |

6 | majk | 158 |

7 | 300iq | 154 |

7 | antontrygubO_o | 154 |

9 | Um_nik | 151 |

10 | kostka | 149 |

why in the second testcase the answer is not ...XXX http://codeforces.com/contest/104/problem/D

↑

↓

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Aug/20/2019 22:35:38 (f2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

As far as I remember, when

nis an even number, all the positions can be divided into two types: odd positions and even positions. The reason is that two players move in turn, and for any single player, if he starts at an even/odd position, he will always "stay" at even/odd positions.Thus, for

n= 6 andk= 3 bullets, if we put all the three bullets at even positions or odd positions, the winning probability is 0.5, since this result in fact only depends on whether the starting position is even or odd. However, if we do not follow the above rules, the winning probability will be decreased. For instance, if it is "...XXX", you can see that we only win if the starting position is 1 and 3, which gives a winning probability 2/6<0.5. Nevertheless, the general case seems difficult to prove...thanks alot :)