-
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
-
Keep100sec
未完成
- 2021-04-21 21:58:49下载
- 积分:1
-
贪吃蛇课程设计
此源码源自大三上学期java实践课程,采用java语言,游戏界面简单,实现了经典游戏贪吃蛇的最基本功能,包括上下左右方向键,分数计算,失败判断等功能。随机生成豆子,适合在校学生在做课程设计时参考使用。在代码中的关键功能部分加入了代码注释,便于理解与修改。使用mfc运行时可能因为版本不同而出现小错误,届时自行修改即可。
- 2022-01-22 12:30:13下载
- 积分:1
-
pintu
实现简单的拼图游戏,可计时,但是还没有复原功能(Simple jigsaw puzzle)
- 2020-06-21 11:20:02下载
- 积分:1
-
21dyxym_a5
很经典的小游戏源码 很值得初学者学习 代码非常详细完善(Very classic game source code is very worthwhile for beginners to learn the code is very detailed and perfect)
- 2015-05-16 15:01:11下载
- 积分:1
-
09class9
说明: 必牛网络教程,整个程序有必牛制作,第四课-图片资源编辑器(三)1(Cattle Network tutorial will be the entire procedure will beef production, the fourth lesson- Image Resource Editor (c) 1)
- 2011-04-15 11:54:31下载
- 积分:1
-
j2melianliankan
跟小时候用麻将玩的连连看很像,就是简单的数字组成,是款很益智的小游戏(lianliankan is like a game that played with majiang in our childhood)
- 2011-12-22 11:17:56下载
- 积分:1
-
wuziqi
实现五子棋的功能,且是一个比较简单移动的程序(Realize the function of renju, and is a relatively simple mobile program
)
- 2012-04-15 11:17:34下载
- 积分:1
-
飞机游戏资源-leidian (2)-飞行物-爱给网
flash小游戏,打飞机,全部素材和源代码(Flash games, aircraft, all the material and source code.)
- 2018-05-25 00:08:27下载
- 积分:1
-
gnuchess-6.0.3.tar
这是一个象棋游戏,它的运行环境是Linux、Unix之类的操作系统。不仅如此,该游戏也可以在Windows环境下展开配置。尽管这较为复杂。(Chess game working on linux like Operating system。)
- 2013-08-10 13:17:11下载
- 积分:1