【题意分析】
给你n个上半平面,求包含这些上半平面的交的上半平面。
【解题思路】
按斜率排序,用单调栈维护一个下凸壳即可。复杂度O(nlog2n)。
【参考代码】
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 #include <cctype> 2 #include <cmath> 3 #include <cstdio> 4 #define REP(I,start,end) for(int I=(start);I<=(end);I++) 5 #define PER(I,start,end) for(int I=(start);I>=(end);I--) 6 inline int space() 7 { 8 return putchar(' '); 9 } 10 inline int enter() 11 { 12 return putchar(' '); 13 } 14 inline bool eoln(char ptr) 15 { 16 return ptr==' '; 17 } 18 inline bool eof(char ptr) 19 { 20 return ptr=='