5 3 2 1 5 1 5
...#. #.#.. .#... #.#.. ...#. The first operation paints the four squares $(2,1)$, $(3,2)$, $(4,3)$, $(5,4)$ black, and the second paints the four squares $(4,1)$, $(3,2)$, $(2,3)$, $(1,4)$ black. Thus, the above output should be printed, since $P=1$, $Q=5$, $R=1$, $S=5$.
5 3 3 4 5 2 5
#.#. ...# The operations paint the nine squares $(1,1)$, $(1,5)$, $(2,2)$, $(2,4)$, $(3,3)$, $(4,2)$, $(4,4)$, $(5,1)$, $(5,5)$. Thus, the above output should be printed, since $P=4$, $Q=5$, $R=2$, $S=5$.
1000000000000000000 999999999999999999 999999999999999999 999999999999999998 1000000000000000000 999999999999999998 1000000000000000000
#.# .#. #.# Note that the input may not fit into a $32$\-bit integer type.
{
"problem": {
"name": "X drawing",
"description": {
"content": "There is an $N\\times N$ grid with horizontal rows and vertical columns, where all squares are initially painted white. Let $(i,j)$ denote the square at the $i$\\-th row and $j$\\-th column. Takahashi ha",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc230_c"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There is an $N\\times N$ grid with horizontal rows and vertical columns, where all squares are initially painted white. Let $(i,j)$ denote the square at the $i$\\-th row and $j$\\-th column.\nTakahashi ha...",
"is_translate": false,
"language": "English"
}
]
}