Advertisement

AcWing 247. 亚特兰蒂斯(线段树|扫描线法)

阅读量:

AcWing 247. 亚特兰蒂斯
线段树与扫描线方法

请添加图片描述

感谢大佬题解

复制代码
    #include<bits/stdc++.h>
    
    using namespace std;
    
    #define db double
    
    const int N = 1e5 + 10;
    
    int n, m;
    vector<db>ys;
    struct Segment{
    	double x, y1, y2;
    	int k;
    	bool operator < (const Segment&t) const{
    		return x < t.x;
    	}
    }seg[N * 2];
    
    struct Node{
    	int l, r;
    	int cnt;  //

全部评论 (0)

还没有任何评论哟~