-
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
-
MP3_ting
MP3 的在线听音乐播放器代码,可以播放,暂停,下一曲等。(listen to music code online of MP3, you can play, pause, next song, etc.)
- 2019-01-27 02:09:39下载
- 积分:1
-
用分支限界方法求解最淡哈密顿回路,可以球接到30以上
用分支限界方法求解最淡哈密顿回路,可以球接到30以上-Using branch and bound method for solving the most light Hamiltonian circuit, you can receive the ball for more than 30
- 2022-01-26 04:04:11下载
- 积分:1
-
OPC_for_PHP
说明: PHP网页的后台OPC客户端通信,实现对PLC数据的读取展示(Background OPC Client Communication of PHP Web Page to Realize Reading and Displaying of PLC Data)
- 2020-06-16 08:40:01下载
- 积分:1
-
选线仿真模型
小电流系统接地选线仿真模型及稳态零序功率方向法仿真算法(Simulation model of grounding fault location for small current system and simulation algorithm of steady zero sequence power direction method)
- 2018-05-10 19:38:32下载
- 积分:1
-
一款简约大气的个人主页HTML源码
一款很不错的个人单页介绍主页,高端大气上档次(A very good personal page introducing home page, high-end atmospheric grade)
- 2020-06-25 09:00:01下载
- 积分:1
-
很实用的Delphi信息管理系统界面源码
一个很实用的Delphi信息管理系统界面源码,这个界面集成了菜单、框架、按钮以及图文导航等众多效果,是一个开发基于Delphi的信息系统时,可借鉴引用的一个用户界面,对于不擅长界面设计的Delphi编程者,这个可以解决你的燃眉之急,哈哈 。
- 2022-10-05 00:55:03下载
- 积分:1
-
robot
本程序是三关机器人的仿真程序。将非线性变结构控制方法运用到三关节机器人系统的动力学控制中,建立了变结构控制器。(This procedure is a three-robot simulation program. Nonlinear variable structure control method applied to the three joint robot dynamics control system, the establishment of a variable structure controller.)
- 2008-05-14 20:23:06下载
- 积分:1
-
j
说明: 基于数字全息和离散余弦变换的数字水印技术(Digital watermarking technology based on digital holography and discrete cosine transform)
- 2013-03-18 15:47:09下载
- 积分:1
-
Login_v363
天堂依薇版363登入器(the Lin1 for login is this)
- 2020-09-07 13:28:03下载
- 积分:1