Atlantis Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11532 Accepted Submission(s): 4898 Probl
转载
2016-11-01 23:56:00
49阅读
2评论
http://acm.hdu.edu.cn/showproblem.php?pid=1542 1 #include 2 #include 3 #include 4 #define maxn 200000 5 using namespace std; 6 7 int n; 8 ...
转载
2014-08-18 10:18:00
11阅读
2评论
http://poj.org/problem?id=1151这道题就是给你一些矩形的左上角和右下角的坐标,这些矩形可能有重叠,求这些矩形覆盖的面积。先把x坐标和y坐标分别离散化。然后再求面积。 1 #include 2 #include 3 #include 4 #define maxn 510 5 using namespace std; 6 7 int n; 8 double x2,y2,x1,y1; 9 bool flag[maxn][maxn];10 double X[maxn],Y[maxn];11 struct node12 {13 double x1,y1,x2,...
转载
2014-02-20 21:20:00
18阅读
2评论
Atlantis Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13934 Accepted Submission(s): 5768 Probl
转载
2017-08-21 19:50:00
19阅读
2评论
Problem Description There are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include ma
转载
2017-09-07 16:56:00
17阅读
2评论
AtlantisTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSu contain
原创
2023-04-20 21:18:54
41阅读
Atlantis Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17606 Accepted Submission(s): 7154 Probl
原创
2021-07-29 17:03:50
52阅读
【题目链接】点击打开链接【题意】求矩形面积并,扫描线经典题!【分析】浮点数先要离散化;然后把矩形分成两条边,上边和下边,对横轴建树,然后从下到上扫描上去,用mark【mark的作用到今天才搞明白,为什么要记录下底边和上底边差的个数,作用是为了统计总的下底边的长度sum时不出错,使得不会重复计算某个面积】表示该区间下边比上边多几个。线段树操作:update:区间增减query:直接取根节点的...
原创
2022-04-20 10:31:46
71阅读
AtlantisTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 11830Accepted: 4588DescriptionThere 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 describe different
原创
2021-07-29 16:20:45
87阅读
原题链接 考察:线段树(扫描线) 思路: 其实是扫描线入门题.(然后就看了很久才略懂) 本题思路还是直接看大佬博客吧GO 想解释的只有几个问题. 为什么结构体如此定义? struct Node{ int l,r,cnt;//实际代表含义是[l,r+1]区间 double len;//cnt是指该区间 ...
转载
2021-05-19 02:50:00
87阅读
2评论
线段树+离散化+扫描线和求矩形合并周长思路差不多#include#include#define N 10010using namespace std;struct Tree{ int l,r,cover; //len表示区间【l,r】被占用的总长度 double len;}tree[3*N];struct Line{ double x,y1,y
原创
2023-09-15 10:05:08
44阅读
AtlantisDescription: There are several ancient Greek texts that contain descriptions of the fabled island Atlanti\
原创
2022-09-09 10:23:30
109阅读
Atlantis http://poj.org/problem?id=1151 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 22662 Accepted: 8478 Description There are several
原创
2021-08-05 10:49:13
36阅读
POJ_1151
这个题目是我第一次接触离散化的东西,看了黑书相关的部分后便按自己的理解设计了一个算法:
首先将x-y平面看成被矩形的四个边所在的直线切成了若干块,然后把每一块看成1个点,之后扫描一遍所有矩形,把这些矩形覆盖的点标记一下,最后再计算一下所有标记的点的面积即可。
这样做排序x坐标是O(nlogn)的复杂度,排序y坐标是O(nlogn),由于x和y轴最多被切2*
转载
2012-02-20 14:10:00
64阅读
2评论
AtlantisTime Limit: 1000msMemory Limit: 32768KBThis problem will be judged onHDU. Original ID:154264-bit integer IO format:%I64d Java class name:MainT...
转载
2014-10-23 20:09:00
14阅读
Problem 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 the island. But unfortunatel
原创
2022-11-09 19:55:02
94阅读
Atlantis Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15236 Accepted Submission(s): 6265 Probl
原创
2021-12-31 17:49:18
58阅读
[POJ1151]Atlantis 试题描述 There are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include
转载
2016-10-13 21:36:00
72阅读
2评论
数学问题 几何 扫描线 线段树
转载
2017-03-21 10:59:00
40阅读
解二: 可以把相互重叠的块都切
原创
2023-07-27 18:46:39
69阅读