Windows
Medium
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
On the Windows desktop, open N windows. Known coordinates of the upper-left corner of x[i], y[i] as well as the width and height of each window w[i], h[i] (i=1..N). How many windows are visible on the screen? The window is visible, if not completely covered with other windows open after him.
Input
In the line of the file is written pevoy one number N - the number of windows. In the next N lines of four numbers - x[i], y[i], w[i], h[i] (i = 1..N). The procedure of opening the windows to their order corresponds to the input data. All values are natural and do not exceed 1000.
Output
A single number - the number of visible windows on the screen.
Examples
Input #1
Answer #1
Submissions 669
Acceptance rate 12%