AtlantisTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) 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 unfortunately, these maps describe different regions of Atlantis. Your friend Bill has to know the total area for which maps exist. You (unwisely) volunteered to write a program that calculates this quantity.
Input The input file consists of several test cases. Each test case starts with a line containing a single integer n (1<=n<=100) of available maps. The n following lines describe one map each. Each of these lines contains four numbers x1;y1;x2;y2 (0<=x1<x2<=100000;0<=y1<y2<=100000), not necessarily integers. The values (x1; y1) and (x2;y2) are the coordinates of the top-left resp. bottom-right corner of the mapped area.
Output For each test case, your program should output one section. The first line of each section must be “Test case #k”, where k is the number of the test case (starting with 1). The second one must be “Total explored area: a”, where a is the total explored area (i.e. the area of the union of all rectangles in this test case), printed exact to two digits to the right of the decimal point.
Sample Input 2 10 10 20 20 15 15 25 25.5 0
Sample Output Test case #1 Total explored area: 180.00
Source Mid-Central European Regional Contest 2000
Recommend linle | We have carefully selected several similar problems for you: 1828 1255 1698 1540 1754
Statistic | Submit | Discuss | Note 线段树扫描线入门题,具体了解 点这里
|
HDU 1542 Atlantis(线段树:扫描线)
原创
©著作权归作者所有:来自51CTO博客作者mb5f5b1df7f1e34的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:线段树应用:扫描线
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
HDU 1542:Atlantis(线段树+扫描线+离散化)
espace std...
i++ 扫描线 离散化 -
【线段树+扫描线】 HDOJ 1542 Atlantis
线段树+扫描线+离散化,由于写过xiansuan
HDU 线段树 扫描线 #include #define -
hdu1542 Atlantis (线段树+扫描线+离散化)
AtlantisTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/
hdu1542 hdu 1542 线段树 离散化 扫描线 -
android线上环境怎么模拟f12
从零搭建Android开发环境Windows版准备工作安装jdk安装Android SDK安装AndroidStudio安装GenyMotion配置AndroidStudioAndroid Studio配置Genymotion 插件开始第一个app 准备工作java jdk 1.8(官网下载),Android SDK(官网下载),Android Studio (官网下载),Genymotion(
android线上环境怎么模拟f12 java android android studio Android