#P5461. 赦免战俘
赦免战俘
Description
There are cheaters standing in a square matrix, waiting for kkksc03's decision. kkksc03 decides to pardon some of them. He splits the square matrix evenly into smaller square matrices, and each smaller matrix has side length half of the original matrix. All cheaters in the upper-left matrix will be pardoned. In the remaining smaller matrices, each matrix is split into even smaller matrices, and cheaters are pardoned in the same way... until the matrix can no longer be split.
All cheaters who are not pardoned will receive the brown-name penalty.
Given , output the fate of each cheater, where means pardoned and means not pardoned.
Input Format
An integer .
Output Format
A 01 matrix representing whether each person is pardoned. There is one space between numbers.
3
0 0 0 0 0 0 0 1
0 0 0 0 0 0 1 1
0 0 0 0 0 1 0 1
0 0 0 0 1 1 1 1
0 0 0 1 0 0 0 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
1 1 1 1 1 1 1 1
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号