#P9198. 「GMOI R2-T1」轴对称
「GMOI R2-T1」轴对称
Problem Description
You have an image (matrix) with rows and columns, and the image has pixels.
Initially, all pixels are black, and the RGB value is . Each operation can change one number in the RGB of a pixel.
After each operation, please output whether the image is left-right symmetric.
Left-right symmetry: that is, for any , it always holds that the RGB value of the pixel in row , column is equal to the RGB value of the pixel in row , column .
Input Format
The first line contains three integers , where is the number of operations.
The next lines each contain four integers , meaning to increase the -th number of the RGB value of the cell in row , column by . If any number in any RGB value exceeds , it is automatically taken modulo .
Output Format
After each operation, if the image is left-right symmetric, output Yes; otherwise output No. Outputs of each query are separated by newlines.
6 6 9
1 2 3 4
5 6 3 4
1 5 3 4
5 1 3 4
1 3 2 260
1 4 2 4
2 2 3 5
2 5 3 7
2 2 3 258
No
No
No
Yes
No
Yes
No
No
Yes
Hint
This problem uses bundled Subtask tests.
| Subtask | Corresponding test points | Total score | |||||
|---|---|---|---|---|---|---|---|
For Subtask 2, it is guaranteed that each variable is generated uniformly at random.
For of the data, , , , , , .
Translated by ChatGPT 5