http://codevs.cn/problem/3044/ 线段树扫描线矩形面积求并 基本思路就是将每个矩形的长(平行于x轴的边)投影到线段树上 下边+1,上边-1: 然后根据线段树的权值和与相邻两条边的差值(高度差)求出相应的矩形面积 #include <bits/stdc++.h> using namespace std; ; #define DB double ]; DB W[N << ], X[N]; struct Node { DB x_1, x_2, h; int h
Atlantis 题目连接 http://poj.org/problem?id=1151 Description here are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of the island. But unfortunately, these maps describ
Atlantis Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 21511 Accepted: 8110 Description There are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of