-
2
Background
Given a set of rectangles {R1, R2, …, Rn}, compute the area of their common intersection. i.e.,
Area(R1∩R2∩…∩Rn)
The edges of the rectangles R1, R2, …, Rn, are either vertical or horizontal lines.
For example, the intersection of 4 rectangles, R1, R2, R3, and R4, in the following figure is the shaded rectangle.
Input
The input contains (N + 1) lines. The first line specifies the number of rectangles N, where 1 < N < 1000. Since the sides of the rectangles are parallel to the x-axis and y-axis, each rectangle is bounded by the lines x = x1, x = x2, y = y1 and y = y2 and each subsequent line of the input file thus specifies one rectangle in the following format:
x1 x2 y1 y2
such that 0 <= x1 < x2 <= 10000 and 0 <= y1 < y2 <= 10000, and x1, x2, y1 and y2 are integers.
Output
The output file contains the area of the intersection of all the rectangles.
- 2013-11-15 02:58:38下载
- 积分:1
-
urebh
search /Download /keyword/sss
- 2018-03-03 10:02:57下载
- 积分:1
-
9732783
This article is to use the rectangular window method to design FIR bandpass filter, to filter out the noise of the music signal,
- 2017-05-12 06:47:10下载
- 积分:1
-
guifilter
说明: 利用 GUI 界面设计滤波器设计,有点难,但具有参考价值(Use GUI interface design, filter design, hard, but the reference value)
- 2008-11-08 14:31:50下载
- 积分:1
-
rengongshichangfa
基于机器人路径规划算法和导航系统的研究,结合粒子群算法和改进人工势场法的移动研究(Based on the research of robot path planning and navigation system, the particle swarm optimization algorithm and the improved artificial potential field method)
- 2017-05-09 17:29:02下载
- 积分:1
-
Wrox.Professional.Apache.Tomcat.5.May.2004
说明: Tomcat 5的外文书目,作者:Vivek Chopra(Professional Apache Tomcat 5 is primarily targeted toward administrators. However, developers (especially
those with additional responsibilities for Tomcat configuration, performance tuning, system security,
or deployment architecture) will find this book extremely useful.)
- 2009-08-20 12:28:24下载
- 积分:1
-
This is a wonderful network of educational software, extracting After installati...
这是一非常棒的网络教学软件,解压安装后,每次启动可费使用12分钟。-This is a wonderful network of educational software, extracting After installation, each fee can start using 12 minutes.
- 2022-03-19 22:37:06下载
- 积分:1
-
matlab
玫瑰花绘制,三维图,唯一不足在于绘制的玫瑰花的颜色以及形状都不是很充分的体现。(the painting of rose)
- 2020-10-09 15:47:37下载
- 积分:1
-
这是为一个扫描枪写的在生产线上比较2个不同的2个串口条玛的程序...
这是为一个扫描枪写的在生产线上比较2个不同的2个串口条玛的程序-This is written by a scanning gun compare the production line in two different two serial procedures Machia Article
- 2023-03-13 01:05:04下载
- 积分:1
-
指示器的jQuery插件
插件中的方法非常容易定制和实现,并且使用的图片都是矢量图片(The method in the plug-in is very easy to customize and implement, and all the pictures used are vector pictures.)
- 2019-01-19 09:48:47下载
- 积分:1