QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#543175#8217. King's DinnerchanmaoWA 0ms3612kbC++141.7kb2024-09-01 14:45:072024-09-01 14:45:11

Judging History

你现在查看的是最新测评结果

  • [2024-09-01 14:45:11]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3612kb
  • [2024-09-01 14:45:07]
  • 提交

answer

#include <iostream>
using namespace std;

char mp[8][8][8];
char G[105][105];

string _1[2] = { "",
				 " ." };
string _2[3] = { "",
				 " ..",
				 " .." };
string _3[4] = { "",
				 " *..",
				 " *..",
				 " ..." };
string _4[5] = { "",
				 " *.*.",
				 " *.*.",
				 " ....",
				 " ...." };
string _5[6] = { "",
				 " **.*.",
				 " ...*.",
				 " *....",
				 " *.**.",
				 " ....." };
string _6[7] = { "",
				 " **.**.",
				 " ......",
				 " **.**.",
				 " ......",
				 " **.**.",
				 " ......" };
string _7[8] = { "",
				 " **.*.*.",
				 " ...*.*.",
				 " **.....",
				 " ....**.",
				 " *.*....",
				 " *.*.**.",
				 " ......." };
	

inline void init() {
	int len = 1;
	len = 1; for (int i = 1; i <= len; i++)  for (int j = 1; j <= len; j++)  { mp[len][i][j] = _1[i][j]; }
	len = 2; for (int i = 1; i <= len; i++)  for (int j = 1; j <= len; j++)  { mp[len][i][j] = _2[i][j]; }
	len = 3; for (int i = 1; i <= len; i++)  for (int j = 1; j <= len; j++)  { mp[len][i][j] = _3[i][j]; }
	len = 4; for (int i = 1; i <= len; i++)  for (int j = 1; j <= len; j++)  { mp[len][i][j] = _4[i][j]; }
	len = 5; for (int i = 1; i <= len; i++)  for (int j = 1; j <= len; j++)  { mp[len][i][j] = _5[i][j]; }
	len = 6; for (int i = 1; i <= len; i++)  for (int j = 1; j <= len; j++)  { mp[len][i][j] = _6[i][j]; }
	len = 7; for (int i = 1; i <= len; i++)  for (int j = 1; j <= len; j++)  { mp[len][i][j] = _7[i][j]; }
}

inline void solve() {
	int n;
	cin >> n; n++;
	if (n <= 7) {
		for (int i = 1; i < n; i++) {
			for (int j = 1; j < n; j++) {
				cout << mp[n][i][j];
			}
			cout << "\n";
		}
		return;
	}
}

int main() {
	init();
	int t;
	cin >> t;
	while (t--) {
		solve();
	}
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3612kb

input:

3
1
2
3

output:

.
*.
*.
*.*
*.*
...

result:

wrong answer Token parameter [name=row of the grid] equals to "*.", doesn't correspond to pattern "[#.]+" (test case 2)