QOJ.ac

QOJ

时间限制: 2 s 内存限制: 1024 MB 总分: 10

#10247. Snapshot [C]

统计

Bajtek is playing with an old black-and-white television that has a $100 \times 100$ pixel screen. He can display any image on it by deciding which pixels are lit and which are dark. However, the television is faulty, and the displayed image usually does not stay on for very long.

A $2 \times 2$ square consisting of 4 adjacent pixels is called "bad" if exactly two diagonally opposite pixels in it are lit. Every second, the television changes the state of all pixels belonging to at least one bad square – pixels that were lit become dark, and those that were dark become lit.

For example, consider a television with a $4 \times 4$ pixel screen, whose initial configuration is shown in the figure on the left. The subsequent figures show how the television screen will look in the following seconds:

second 0, second 1, second 2, second 3

Bajtek wants to use this effect to maximize the number of unique screen configurations. In other words, we want to maximize the time after which a screen configuration repeats. For the example above, we see that the configuration at second 3 is identical to the configuration at second 1, so we have three unique screen configurations.

Your task is to find and output the initial pixel configuration. Your result in this task will depend on how many seconds it takes for a screen configuration to repeat.

Input

The input for this task is empty.

Output

You must output 100 lines, each containing one word consisting of 100 characters (1s and 0s), representing the initial configuration of the television screen (1 means a lit pixel, 0 means a dark pixel).

Subtasks

Your program will be run 10 times; the $i$-th run will receive 1 point if the number of seconds after which a screen configuration repeats is at least $(10 \cdot i - 1)^2$.

Note

In the "Files and tests" section on SIO, there is an archive with a visualization tool. A Python script (requires matplotlib and numpy libraries) allows you to see the displayed configuration.

To run the visualization, use the command:

python3 visualise.py < mig.txt

The archive also contains an example mig.txt file. This visualization can be modified as needed.

Note: We have made every effort to ensure the visualization is safe for people with epilepsy, but please exercise caution.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.