, Violation Code
How many desktops are there?
Time Limit: 3000 MS Memory Limit: 365536 K
Total Submit: 23 Accepted: 15
Description
Zjahstu insists on computer-related thinking and coding every day.
"The elderly ACM" becomes a cool man, referred to as "the old ox. Because every application process
The window in sequence can be regarded as a rectangle. overlapping windows are too common.
Think: How much area is not covered? Programming help.
Let's explain: set the size of desktop D to M * N, 120 = standard (X, Y) and its length to L high H (unit: pixel ), your task is D-Wi.
Product, gray indicates 800*600 of the desktop, Red blue indicates the window, and the remaining area is
240000 pixels (do not consider the status bar)
Input
The first line is the number of test cases m, followed by the m group of test data
Each group of test data has two integers indicating the desktop size, followed by k indicating that there are k program windows W
Each window is represented by four integers, indicating the coordinates X, Y, length L, and height H in the upper left corner.
Output
The output is the desktop area not covered by the window.
Sample Input
2800 600 21 1 400 300401 301 800 6001024 768 11 1 1024 768
Sample Output
2400000
Source
Ahstu @ ICPC02
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger. Welcome to share your nice codes!