Description
Input
第1行输入R,C,Q.接下来输入R行C列的目标画.之后Q行一行输入一次操作的5个参数.
Output
对每一次操作,输出操作过后正确着色的方格数.
Sample Input
17 15 10111111101111111
111111000111111
111110000011111
111100000001111
111000000000111
111100000001111
111000000000111
110000000000011
111000000000111
110000000000011
100000000000001
110000000000011
100000000000001
000000000000000
111111000111111
111111000111111
111111000111111
5 8 2 14 1
8 17 3 7 1
4 5 10 15 0
7 16 12 14 1
2 17 13 14 0
2 6 2 3 1
13 14 4 8 1
3 6 6 7 1
1 16 10 11 0
7 16 10 10 0
Sample Output
11394
95
91
87
93
91
87
93
93