#P16205. 「o.OI R-1 EX」雷同题
「o.OI R-1 EX」雷同题
Background
(The problem provider is True154.)
Please submit using the “submit answer” method to prevent your solution from being stolen.
On December 8, 2005, the United Nations General Assembly announced that April 4 each year would be set as the International Day for Mine Awareness and Assistance in Mine Action (full name: International Day for Mine Awareness and Assistance in Mine Action).
This day aims to raise public awareness of the humanitarian threats caused by landmines, explosive remnants of war, and improvised explosive devices, and to encourage countries to strengthen their mine action capabilities.
The flea frog country has always taken flea frog humanitarianism as its foundation, regarding the protection of civilians and the healing of war trauma as its duty. In response to the international call, the flea frog country has decided to form a team with both solid knowledge of landmines and rich mine-clearing experience. At present, four-by-seven selection problems closely centered on the Minesweeper theme are ready. Who will stand out in this selection? Let us wait and see.
Problem Description
For each , you need to place as few mines as possible in the cube with coordinates , such that for any , if is not a mine, then among the positions adjacent to it, there are exactly mines.
Here, two coordinates are called “adjacent” if the difference of each coordinate is at most . It is guaranteed that .
In this problem, you need to directly use one program to output the constructions for to in order. See 【Output Format】 for details.
Input Format
Input an integer , guaranteed .
Output Format
Output the constructions for in order.
For each , output square matrices of size rows and columns. From top to bottom, they represent the mine layout in your construction. * denotes a mine, and . denotes empty space. Do not output extra blank lines.
55
***********************************************
***********************************************
(还有 90970 行长度为 57 的全 '*' 串,样例写不下)
Hint
Sample Explanation
In the sample output, all positions are mines, which is a valid output.
According to the scoring rules, is the number of empty cells, which is .
The total score is .
Scoring Rules
Define as:
-
If your construction for is valid, then is the number of empty cells.
-
If your construction for is invalid, then .
Your score is .
If you do not know how to construct for some , you still need to output any layout in the required format.
You need to achieve a total score of at least in this problem to be considered as passing.
The highest score on-site was , and the current sum of the highest scores at all points is .
Checker
After downloading the additional file, there is a line inside:
freopen("1.out","r",stdin);
1.out is your answer output file, and the checker will read from this file.
If the output format is incorrect, it returns Wrong answer.
Otherwise, you will get the total score, as well as the validity and score for .
Translated by ChatGPT 5