{"problem":{"name":"Three Cells per Row and Column","description":{"content":"We have a grid board with $N$ rows and $N$ columns. Paint every square black or white to satisfy all of the conditions below. *   For each row, exactly three of the squares in that row are painted bl","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"agc056_a"},"statements":[{"statement_type":"Markdown","content":"We have a grid board with $N$ rows and $N$ columns.\nPaint every square black or white to satisfy all of the conditions below.\n\n*   For each row, exactly three of the squares in that row are painted black.\n*   For each column, exactly three of the squares in that column are painted black.\n*   There are exactly $N$ connected components of black squares. Here, two black squares $x$ and $y$ are considered connected when it is possible to start at $x$ and reach $y$ by repeatedly moving up, down, left, or right to a black square.\n\nIt can be proved that the Constraints of the problem guarantee the existence of a solution.\n\n## Constraints\n\n*   $6 \\leq N \\leq 500$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"agc056_a","tags":[],"sample_group":[["6","##..#.\n##..#.\n..##.#\n..##.#\n##...#\n..###.\n\nHere, there are exactly $3$ `#`s in each row and column. Additionally, there are exactly $6$ connected components of `#`s."]],"created_at":"2026-03-03 11:01:14"}}