-
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
-
T_PMMA-水结构仿真_180718
声学仿真。模拟声柱在comsol的情况。声学入门案例,适合初学者(Acoustic simulation. Simulated sound column in COMSOL. Introduction to acoustics, suitable for beginners)
- 2020-10-20 14:27:25下载
- 积分:1
-
qq082
添加噪声处理,IMC-PID是利用内模控制原理来对PID参数进行计算,数据模型归一化,模态振动。( Add noise processing, The IMC- PID is using the internal model control principle for PID parameters is calculated, Normalized data model, modal vibration.)
- 2017-05-23 00:13:21下载
- 积分:1
-
回复时间轴代码
CSS3工单回复时间轴代码是一款手机端流程时间轴样式代码。(CSS3 Worksheet Reply Timeline Code is a mobile phone process timeline style code.)
- 2019-03-03 17:23:00下载
- 积分:1
-
一些基本函数的程序源代码:包括(1)malloc函数(2)free函数(3)realloc函数(4)calloc函数 (5)学生数据库的编写(6)通讯录 以上都...
一些基本函数的程序源代码:包括(1)malloc函数(2)free函数(3)realloc函数(4)calloc函数 (5)学生数据库的编写(6)通讯录 以上都包含c语言源码,obj文件及应用程序-Some of the basic function of the source code of the program include: (1) malloc function (2) free function (3) realloc function (4) calloc function (5) the preparation of students in the database (6) address book contains more than c language source code, obj documents and applications
- 2023-06-27 21:45:03下载
- 积分:1
-
SVD-TLS
说明: 用SVD-TLS估计观测数据的ARMA模型的AR参数,(Estimate the AR parameters of the ARMA model of the observed data)
- 2020-04-08 12:37:42下载
- 积分:1
-
Asynchronous-motor
各种异步电机在matlab-simulink下的仿真模型。(All kinds of asynchronous motor in matlab simulation model-simulink.)
- 2012-04-17 09:20:12下载
- 积分:1
-
UTCHEM
化学驱仿真模拟系统,由美国得克萨斯大学编写。(Chemical flooding simulation system, prepared by the University of Texas.)
- 2012-09-28 15:45:11下载
- 积分:1
-
文件上传组件美化jQuery插件
说明: 一款简单的HTML5文件上传组件美化jQuery插件(A Simple HTML5 File Upload Component to Beautify jQuery Plug-in)
- 2018-12-29 15:59:19下载
- 积分:1
-
原创作品,一个好玩的俄罗斯方块,写此游戏只为练手,希望能够帮助跟我一样才开始学vc的新手...
原创作品,一个好玩的俄罗斯方块,写此游戏只为练手,希望能够帮助跟我一样才开始学vc的新手-original works, a fun Tetris, this game was made just for practicing hand, hoping to help as I only started to learn vc newbie
- 2023-07-12 23:10:03下载
- 积分:1