-
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
-
Snake
程序由C++编写,贪吃蛇程序,经运行无误,贪吃蛇长度无限制……(C++ written Snake program, run correctly, Snake length unlimited ...)
- 2013-01-10 21:18:13下载
- 积分:1
-
PuzzzleGame
Game in Csharp to demonstrate students about game programming.
- 2012-07-30 03:33:32下载
- 积分:1
-
MySnake
用VC编写的简单版贪食蛇,用(W,A,S,D)分别的上,左,下,右,还可以用向上,向下,向左,向右键(VC prepared using a simple version of贪食蛇with (W, A, S, D), respectively, the upper, left, down, right, also can be used up, down, left to right)
- 2008-05-26 12:02:02下载
- 积分:1
-
675646545
VB反应能力测试小游戏,打地鼠源代码.有需要的下.(VB reaction capability test game, play hamster source code are in need.)
- 2013-08-23 17:56:27下载
- 积分:1
-
tetris
俄罗斯方块.本程序包含最基本设计框架,可以实现消格子(Tetris eluosfangkuai)
- 2013-06-29 19:39:43下载
- 积分:1
-
e
基于c++编程的俄罗斯方块源程序代码 请多多支持 (Please support Tetris based c++ programming source code)
- 2013-05-13 20:44:12下载
- 积分:1
-
JigsawPuzzle
说明: 用VB实现3乘3的拼图游戏,以前VB课程设计的时候做的,用了一个叫PictureClip的控件。(Using VB to achieve 3 by 3 puzzle, before, when VB program to do the design, uses a control called PictureClip.)
- 2010-05-04 22:05:05下载
- 积分:1
-
saiche
简单的赛车游戏,在游戏中可以实现加速、减速和换道。游戏中尽量躲避障碍,一共有5次生命。(Simple racing game, the game can achieve acceleration, deceleration and lane changing Try to avoid obstacles in the game, a total of five times the life.)
- 2012-11-01 13:49:47下载
- 积分:1
-
tuixiangzi-src
一款推箱子游戏的源代码,希望可以对游戏编程有帮助(I hope the source code of a Sokoban game can help your game programming)
- 2012-03-23 09:09:09下载
- 积分:1