A template of discretization + scaning line + segment tree. It's easy to understand, but a little difficult for coding as it has a few details. #include"Head.cpp" const int N=207; double x[N<<1]; struct Point{ double l,r,h; int w; bool ope…
Atlantis Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 11777    Accepted Submission(s): 4983 Problem Description There are several ancient Greek texts that contain descriptions of the fabled…
学习链接:http://blog.csdn.net/lwt36/article/details/48908031 学习扫描线主要学习的是一种扫描的思想,后期可以求解很多问题. 扫描线求矩形周长并 hdu 1928 Picture Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4795    Accepted Submission(s):…
Atlantis Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 10599    Accepted Submission(s): 4524 Problem Description There are several ancient Greek texts that contain descriptions of the fabled…
题目原链接:http://poj.org/problem?id=1151 题目中文翻译: POJ 1151 Atlantis Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 25769   Accepted: 9477 Description 有几个古希腊文本包含传说中的亚特兰蒂斯岛的描述. 其中一些文本甚至包括岛屿部分地图. 但不幸的是,这些地图描述了亚特兰蒂斯的不同区域. 您的朋友Bill必须知道地图的总面积. 你(不…
一样的题:HDU 1542 Atlantis Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 18148   Accepted: 6902 Description There are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include map…
题目链接:http://poj.org/problem?id=1151 题目大意:坐标轴上给你n个矩形, 问这n个矩形覆盖的面积 题目思路:矩形面积并. 代码如下: #include<stdio.h> #include<vector> #include<algorithm> using namespace std; ; struct Line { int l, r, flag; double h; Line(){} Line(int l, int r, int flag…
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…
题目链接:http://poj.org/problem?id=1151 题意是平面上给你n个矩形,让你求矩形的面积并. 首先学一下什么是扫描线:http://www.cnblogs.com/scau20110726/archive/2013/04/12/3016765.html 这是别人的blog,写的挺好的.然后明白扫描线之后呢,接下来就很简单了,只需要一次一次求面积然后累加就好了.这题离散化之后,数据的范围更小了(因为n只有100),单点更新就行了. #include <iostream>…
这次是求矩形面积并 /* Problem: 1151 User: 96655 Memory: 716K Time: 0MS Language: G++ Result: Accepted */ #include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <string> #include…