The sun is shining directly above and
Input Specification
The first line contains a single integer
The next
Note: fast input may be required.
Constraints
Subtask 1 [10%]
Subtask 2 [30%]
Subtask 3 [60%]
Output Specification
Output a single integer, the number of empty spaces under at least one textbook modulo
Sample Input 1
Copy
3
1 3 1
3 3 1
5 3 1
Sample Output 1
Copy
6
Sample Input 2
Copy
5
1 2 1
3 1 1
3 4 1
6 3 2
5 2 1
Sample Output 2
Copy
9
Explanation for Sample Output 2
The textbooks are represented with a digit. A period represents a unit in the shade.
Copy
55
.444
.444
3333..
112.....
Sample Input 3
Copy
4
5 1 2
3 1 2
5 1 1
3 3 1
Sample Output 3
Copy
4
Explanation for Sample Output 3
Copy
444
..3
2.1
2.1
Comments
bobhob314 and his super sticky substance ( ͡° ͜ʖ ͡°)---->Suspicious.
:(