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

1 | Benq | 3797 |

2 | tourist | 3723 |

3 | Radewoosh | 3720 |

4 | ecnerwala | 3579 |

5 | ksun48 | 3463 |

6 | Um_nik | 3457 |

7 | maroonrk | 3446 |

8 | jiangly | 3432 |

9 | Petr | 3370 |

10 | scott_wu | 3350 |

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

1 | 1-gon | 209 |

2 | awoo | 184 |

2 | rng_58 | 184 |

4 | Errichto | 182 |

5 | SecondThread | 177 |

6 | maroonrk | 176 |

6 | Radewoosh | 176 |

6 | -is-this-fft- | 176 |

9 | Um_nik | 173 |

10 | antontrygubO_o | 169 |

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jun/23/2021 03:31:57 (i1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

What's idea in 900 div2?

It's obvious that if first player chooses some cell (x, y), second player chooses a cell with a maximum distance to (x, y). So we need to minimize the maximum distance from other cells to chosen. We can precompute the d[x][y][x2][y2] — the minimum distance from (x, y) to (x2, y2). Then just iterate over all cells, and for each cell compute maximum distance from other cells to chosen. Then just get minimum. That's all.

You can use a simple SPFA to pass it, it's an easy problem! We know that first person always choose the start point to minimize the longest shortest path from it. So we need to determind every point in the map and let it be the start point. Then we can use a SPFA to calculate all shortest path from this point and find the longest. At last we should return the smallest longest shortest path amaong all the nodes. We can think it just an O(N*N) algorithm. Because of N is at most 1600, so we can pass this problem now!

Sad my history. I tried to solve the 550's problem first and I did not have time to send 250's problem. Then, my solution was hacked because I forgot to write '<=' instead '<'.

Is it a good idea try to solve the second problem and then to solve the first in Topcoder?I think it depends. Since the order of solving doesn't matter in Topcoder if you have enough time to solve both, either way is fine.

If you solve easy problem first, you will get some certain points as well as a kind of warmup before going to the next ones.

If you choose to start with the medium — like what I usually do, you will avoid lack of time for it in some cases, but some tricky 250 probably become more challenging if you switch into them too late. To prevent this from happening, use the scoreboard wisely. However, the main reason I stick with this strategy is because I do not learn much from solving a 250 only. Some times it works, the other you may end up with no problem solved. Yet I think keeping doing this way would help you improve your solving skill faster, as least in my own experience.

Well according to me it is always a good idea to first attempt the 500 problem because at the start you can give time to a better question as compared to a 250 point problem which on an average just requires at most 5-7 minutes (if it is not a tricky one).Well you can also take the help of the scoreboard to make a guess what is the level of the question and switch to the other question if required ....

Editorial

Nice magic trick. Thanks!

Magic? :) Just a rotation using complex numbers: