[Atc318B] Overlapping sheets
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Problem Statement
There are rectangular sheets spread out on a coordinate plane.
Each side of the rectangular region covered by each sheet is parallel to the - or -axis. Specifically, the -th sheet covers exactly the region satisfying and .
Let be the area of the region covered by one or more sheets. It can be proved that is an integer under the constraints. Print as an integer.
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:

Output
Print the area of the region covered by one or more sheets as an integer.
3
0 5 1 3
1 4 0 5
2 5 2 4
20
The three sheets cover the following regions. Here, red, yellow, and blue represent the regions covered by the first, second, and third sheets, respectively.

Therefore, the area of the region covered by one or more sheets is .
2
0 100 0 100
0 100 0 100
10000
Note that different sheets may cover the same region.
3
0 1 0 1
0 3 0 5
5 10 0 10
65
Programming exercise on 21 August
- 状态
- 已结束
- 规则
- XCPC
- 题目
- 4
- 开始于
- 2024-8-21 17:30
- 结束于
- 2024-8-21 18:30
- 持续时间
- 1 小时
- 主持人
- 参赛人数
- 2