Language: HTML document.onkeydown=function (e){ var currKey=0,evt=e||window.event; currKey=evt.keyCode||evt.which||evt.charCode; if (currKey == 123) { window.event.cancelBubble = true; window.event.returnValue = false; } }

2020 Hdu多校第十场 1003 && Hdu 6879 一种奇怪的解法

2020 Hdu多校第十场 1003 && Hdu 6879

原文链接 https://www.cnblogs.com/-Dominate-/p/13539788.html

题面

Mine Sweeper

Problem Description
A mine-sweeper map can be expressed as an r×c grid, and each cell of the grid is either mine cell or non-mine cell. A mine cell has no number on it, while a non-mine cell has a number, the number of mine cells that share at least one common point with the cell, on it. Following is a 16×30 mine-sweeper map, where flag cells denotes mine cells while blank cells denotes non-mine cells with number 0 on them.

Given an integer S, construct a mine-sweeper map of r,c both not exceeding 25, whose sum of numbers on non-mine cells exactly equals S. If multiple solutions exist, print any one of them. If no solution, print "-1" in one line.

Input
The first line contains one positive integer T (1≤T≤1001), denoting the number of test cases. For each test case:

Input one line containing one integer S(0≤S≤1000).

Output
For each test case:

If no solution, print "-1" in one line.

If any solution exists, print two integers r,c(1≤r,c≤25) in the first line, denoting the size of the mine-sweeper map. Following r lines each contains a string only containing "." or "X" of length c where ".", "X" denote non-mine cells and mine cells respectively, denoting each row of the mine-sweeper map you construct.

Please notice that you needn't print the numbers on non-mine cells since these numbers can be determined by the output mine-sweeper map.

Sample Input
2
7
128

Sample Output
2 4
X..X
X...
5 19
.XXXX..XXXXX..XXXX.
XX.......X....X..XX
X........X....XXXX.
XX.....X.X....X..XX
.XXXX...XX....XXXX.

Hint
For the first test case, the map with numbers is as follows:
X21X
X211

The sum of these numbers equals 2+1+2+1+1=7.

Source
2020 Multi-University Training Contest 10

思路

因为一开始没想到标答的构造,于是看到S只有01000这1001种情况的我又有了一个危险的想法:按某种玄学法则生成!~其实就是打表= =~~
结果就是我用乱搞的48条法则+5个特判过了这题
但是因为5个特判的验算程序下标从1而非从0开始导致这5个特判全错于是只能赛后才过
话不多说直接放684行的代码

#include<iostream>
#include<cstring>
#define ll long long
#define IO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
using namespace std;
char g[1050][30][30];
char tmp[30][30];
int vis[1050];
int r[1050];
int c[1050];
char tmp615[30][30]=
{
    ".........................",
	".........................",
	".X.....................X.",
	".X.....................X.",
	".X.X.................X.X.",
	".X.X.....XXXXXXXXXXX.X.X.",
	".X.X.X.............X.X.X.",
	".X.X.X...XXX.X.....X.X.X.",
	".X.X.X.X.........X.X.X.X.",
	".X.X...X.XX.XX...X.X.X.X.",
	".X.X...X.......X.X.X.X.X.",
	".X.X...X.X.............X.",
	".X.X...X.X.............X.",
	".X.X...X.X.............X.",
	".........................",
	".X..........XXXX.X...X.X.",
	".X...............X.X...X.",
	"..........X..............",
	".X.......................",
	".........................",
	".........................",
	".........................",
	".........................",
	".........................",
	"X........................"
};
char tmp927[30][30]=
{
    "....................XXXXX",
	".........................",
	".X.....................X.",
	".X.....................X.",
	".X.X.................X...",
	".X.XXXXXXXXXXXXXXXXX.X...",
	".X.X.X.............X.X.X.",
	".X.X.X.X.....X.....X.X.X.",
	".X.X.X.X.........X.X.X.X.",
	".X.X...X.XX.XXXX.X.X.X.X.",
	".X.X...X.X.....X.X.X.X.X.",
	".X.X...X.X.............X.",
	".X.X...X.X.............X.",
	".X.X...X.X.............X.",
	".........................",
	".X..........XXXX.X.X.X.X.",
	".X...............X.X.X.X.",
	".........................",
	".........................",
	".....XXXXXXXXXXXXXXX.....",
	".........................",
	"...XXXXXXXXXXXXXXXX......",
	".........................",
	"..XXXXXXXXXXXXXXXXXX.....",
	"........................."
};
char tmp945[30][30]=
{
    "....................X.X.X",
	".........................",
	".X.....................X.",
	".X.....................X.",
	".X.X.................X...",
	".X.XXXXXXXXXXXXXXXXX.X...",
	".X.X.X.............X.X.X.",
	".X.X.X.X.XXX.X.....X.X.X.",
	".X.X.X.X.........X.X.X.X.",
	".X.X...X.XX.XXXX.X.X.X.X.",
	".X.X...X.X.....X.X.X.X.X.",
	".X.X...X.X.............X.",
	".X.X...X.X.............X.",
	".X.X...X.X.............X.",
	".........................",
	".X..........XXXX.X.X.X.X.",
	".X...............X.X.X.X.",
	".........................",
	".........................",
	".....XXXXXXXXXXXXXXX.....",
	".........................",
	"...XXXXXXXXXXXXXXXX......",
	".........................",
	"..XXXXXXXXXXXXXXXXXX.....",
	"........................."
};
char tmp954[30][30]=
{
	".........................",
	".........................",
	".X.....................X.",
	".X.....................X.",
	".X.X.................X.X.",
	".X.XXXXXXXXXXXXXXXXX.X.X.",
	".X.X.X.............X.X.X.",
	".X.X.X.X.XXX.X.....X.X.X.",
	".X.X.X.X.........X.X.X.X.",
	".X.X...X.XX.XXXX.X.X.X.X.",
	".X.X...X.X.....X.X.X.X.X.",
	".X.X...X.X.............X.",
	".X.X...X.X.............X.",
	".X.X...X.X.............X.",
	".........................",
	".X..........XXXX.X.X.X.X.",
	".X...............X.X.X.X.",
	"..........X..............",
	".X.......................",
	".....XXXXXXXXXXXX..X.....",
	".........................",
	"...XXXXXXXXXXXXXXXX......",
	".........................",
	"..XXXXXXXXXXXXXXXXXXX....",
	"........................."
};
char tmp974[30][30]=
{
	".........................",
	".........................",
	".X.....................X.",
	".X.....................X.",
	".X.X.................X.X.",
	".X.XXXXXXXXXXXXXXXXX.X.X.",
	".X.X.X.............X.X.X.",
	".X.X.X.X.XXX.X.....X.X.X.",
	".X.X.X.X.........X.X.X.X.",
	".X.X...X.XX.XXXX.X.X.X.X.",
	".X.X...X.X.....X.X.X.X.X.",
	".X.X...X.X.............X.",
	".X.X...X.X.............X.",
	".X.X...X.X.............X.",
	".........................",
	".X..........XXXX.X.X.X.X.",
	".X...............X.X.X.X.",
	"..........X..............",
	".X.......................",
	".....XXXXXXXX......X.....",
	".........................",
	"..XXXXXXXXXXXXXXXXXXXXX..",
	"..X......................",
	"..XXXXXXXXXXXXXXXXXXXX...",
	"X.X..................X..X"
};
int countnum(int r,int c)
{
    int cnt=0;
    for(int i=1;i<=r;i++)
        for(int j=1;j<=c;j++)
            if(tmp[i][j]=='.')
            {
                if(tmp[i-1][j-1]=='X')cnt++;
                if(tmp[i-1][j+1]=='X')cnt++;
                if(tmp[i+1][j-1]=='X')cnt++;
                if(tmp[i+1][j+1]=='X')cnt++;
                if(tmp[i][j-1]=='X')cnt++;
                if(tmp[i][j+1]=='X')cnt++;
                if(tmp[i-1][j]=='X')cnt++;
                if(tmp[i+1][j]=='X')cnt++;
            }
    return cnt;
}
void tackle(int rr,int cc)
{
    int nowcnt=countnum(rr,cc);
    if(nowcnt<=1000)
    {
        if(!vis[nowcnt])
        {
            vis[nowcnt]=1;
            for(int i=1;i<=rr;i++)
                for(int j=1;j<=cc;j++)
                    g[nowcnt][i][j]=tmp[i][j];
            r[nowcnt]=rr;c[nowcnt]=cc;
        }
    }
}
void init()
{
    for(int rr=1;rr<=25;rr++)
    {
        for(int cc=1;cc<=25;cc++)
        {
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r%2&&c%2)tmp[r][c]='X';
                    else if(r%3==1&&c%3==2)tmp[r][c]='X';
                    else if(r%2==0&&c%2)tmp[r][c]='.';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r%2==0&&c%2==0)tmp[r][c]='X';
                    else if(r%3==2&&c%3==1)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r%3==1&&c%2==0)tmp[r][c]='X';
                    else if(r%3==2&&c%3==1)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r%3==2&&c%2)tmp[r][c]='X';
                    else if(r%3==2&&c%3==1)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c%3)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c%2||r%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c%2==0||r%2==0)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c%2==0||r%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);//num 9
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r%3==0||c%3==0)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r%3||c%3==0)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r%4==0||c%4==0)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r%5==0||c%5==0)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r%6==0||c%6==0)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r%7==0||c%7==0)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r%8==0||c%8==0)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r%4||c%4==0)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r%4||c%4==0)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r>=rr-1)tmp[r][c]='.';
                    else if(r%2||c%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-1)tmp[r][c]='.';
                    else if(r%3)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r>=rr-1)tmp[r][c]='.';
                    else if(c%4)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-10)tmp[r][c]='.';
                    else if(r%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r>=rr-9)tmp[r][c]='.';
                    else if(c%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r>=rr-8)tmp[r][c]='.';
                    else if(c%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r>=rr-6)tmp[r][c]='.';
                    else if(c%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r>=rr-4)tmp[r][c]='.';
                    else if(c%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-2)tmp[r][c]='.';
                    else if(r%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);//num 27
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(r>=rr-1||r<=1)tmp[r][c]='.';
                    else if(c%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-2||c<=1)tmp[r][c]='.';
                    else if(r%3)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-5||c==12||c==16)tmp[r][c]='.';
                    else if(r%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-4||c==12||c==16)tmp[r][c]='.';
                    else if(r%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-3||c==11||c==16||c==7)tmp[r][c]='.';
                    else if(r%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-4||c==11||c==13||c==6)tmp[r][c]='.';
                    else if(r%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-2||c==11||c==13||c==6||c==17)tmp[r][c]='.';
                    else if(r%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-3||c==3||c==11||c==15||c==6||c==17)tmp[r][c]='.';
                    else if(r%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-3||c==3||c==11||c==15||c==6||c==17)tmp[r][c]='.';
                    else if(r%3)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-3||c==3||c==11||c==15||c==6||c==17)tmp[r][c]='.';
                    else if(r%4)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-3||c==3||c==11||c==15||c==6||c==17)tmp[r][c]='.';
                    else if(r%5)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-3||c==3||c==11||c==15||c==6||c==17)tmp[r][c]='.';
                    else if(r%6)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-3||c==3||c==11||c==15||c==6||c==17)tmp[r][c]='.';
                    else if(r%9)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-3||c==8||c==10||c==15||c==6||c==14)tmp[r][c]='.';
                    else if(r%3)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-3||c==9||c==10||c==15||c==6||c==14)tmp[r][c]='.';
                    else if(r%3)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-1||c==6||c==8||c==10||c==19||c==6||c==15)tmp[r][c]='.';
                    else if(r%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-1||c==5||c==8||c==11||c==19||c==2||c==15)tmp[r][c]='.';
                    else if(r%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c==cc||c==2||c==5||c==8||c==12||c==17||c==3||c==10)tmp[r][c]='.';
                    else if(r%3)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-2||c==2||c==5||c==8||c==11||c==17||c==14||c==20||c==23)tmp[r][c]='.';
                    else if(r%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-2||c==2||c==5||c==8||c==11||c==17||c==14||c==20||c==23)tmp[r][c]='.';
                    else if(r%2)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
            memset(tmp,0,sizeof(tmp));
            for(int r=1;r<=rr;r++)
                for(int c=1;c<=cc;c++)
                {
                    if(c>=cc-1||c==7||c==8||c==9||c==10||c==14||c==15||c==23||c==18)tmp[r][c]='.';
                    else if(r%3)tmp[r][c]='X';
                    else tmp[r][c]='.';
                }
            tackle(rr,cc);
        }
    }
}
int main()
{
	// freopen("tmp.txt","r",stdin);
	// freopen("ttmp.txt","w",stdout);
	IO;
    init();
    int t;cin>>t;
    while(t--)
    {
        int n;cin>>n;
        if(n==615)
        {
            cout<<"25 25\n";
            for(int i=0;i<25;i++)
            {
                for(int j=0;j<25;j++)
                    cout<<tmp615[i][j];
                cout<<'\n';
            }
        }
        else if(n==927)
        {
            cout<<"25 25\n";
            for(int i=0;i<25;i++)
            {
                for(int j=0;j<25;j++)
                    cout<<tmp927[i][j];
                cout<<'\n';
            }
        }
        else if(n==945)
        {
            cout<<"25 25\n";
            for(int i=0;i<25;i++)
            {
                for(int j=0;j<25;j++)
                    cout<<tmp945[i][j];
                cout<<'\n';
            }
        }
        else if(n==954)
        {
            cout<<"25 25\n";
            for(int i=0;i<25;i++)
            {
                for(int j=0;j<25;j++)
                    cout<<tmp954[i][j];
                cout<<'\n';
            }
        }
        else if(n==974)
        {
            cout<<"25 25\n";
            for(int i=0;i<25;i++)
            {
                for(int j=0;j<25;j++)
                    cout<<tmp974[i][j];
                cout<<'\n';
            }
        }
        else
        {
            cout<<r[n]<<" "<<c[n]<<'\n';
            for(int i=1;i<=r[n];i++)
            {
                for(int j=1;j<=c[n];j++)
                    cout<<g[n][i][j];
                cout<<"\n";
            }
        }
    }
    return 0;
}
posted @ 2020-08-21 10:45  DDDOMINATE  阅读(383)  评论(0)    收藏  举报