SCUT - 151 - Ma Ying-jeou and his greedy lawn =

https://scut.online/p/151

A rectangular piece of turf, a group of the center line, the center switch may be opened to a rectangular lawn watering, seeking to cover the whole minimum rectangle switches required.

Initially did not know how to deal with these boundary points ......

But in fact observed that the fact that first of all it is symmetrical, considering only the top half. Each point on the boundary is covered, it will be covered with the vertical. Therefore, it is clear that we need to cover the top of the border.

It is to give a bunch of segments, the segments To find the least complete coverage of the border. Greedy you can press the right boundary after ordering.

Guess you like

Origin www.cnblogs.com/Inko/p/11688952.html