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; //记录这个线段出现的次数
double len;
}tr[N * 8];
int find(double y){
return lower_bound(ys.begin(), ys.end(), y) - ys.begin();
}
void pushup