기출 문제 / ACPC 2026 ACPC

Dominoes on a Cube

Cody bought a cube of size N×N×N.

Each face of the cube is an N×N grid, and its cells are colored alternately black (B) and white (W) like a chessboard.

That is, each face of the cube has one of the following two grid patterns.