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

1 | tourist | 3821 |

2 | Benq | 3744 |

3 | ksun48 | 3559 |

4 | Radewoosh | 3538 |

5 | peehs_moorhsum | 3531 |

6 | Um_nik | 3488 |

7 | maroonrk | 3423 |

8 | Petr | 3379 |

9 | sunset | 3337 |

10 | ecnerwala | 3335 |

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

1 | 1-gon | 206 |

2 | Errichto | 181 |

3 | awoo | 180 |

3 | Um_nik | 180 |

5 | -is-this-fft- | 175 |

6 | maroonrk | 174 |

7 | Radewoosh | 173 |

8 | tourist | 172 |

9 | SecondThread | 170 |

10 | rng_58 | 166 |

↑

↓

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jul/29/2021 09:00:19 (g2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

I haven't seen that randomized algo to intersecting halfplanes earlier, but I think it's worth noting that main idea is almost the same as in Smallest Enclosing Circle problem (does there even exist deterministic algo with similar complexity?)

Yes, it's quite similar. I'm surprised you didn't see this one before — I had the feeling of being the last one to the party when I learned about it :)

Maybe that's because I am quite satisfied with online half-planes intersection working in that pompon left in our library :).

Can you please share your library here ?

I think that I know a different solution to the half-plane problem. Instead of doing binary search, let the value gradually decrease and look at the polygon where

Omust be located. Initially, when , this polygon is the same as the input polygon. When the value is decreased, the sides move inwards at constant speed which can be determined in linear time using rotating calipers algorithm. The lengths of the sides decrease linearly, so it is possible to find the times when each length would reach zero. When the length of a side becomes zero, adjacent sides will begin shrinking faster, so it is necessary to emulate this process and to recompute the times for adjacent sides when one of the sides disappears. This can be easily done in time using a heap. So, this solution works in time, doesn't use binary search and is completely deterministic.