QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#141495 | #6189. Full Clue Problem | rain_sbox | WA | 1ms | 3632kb | C++14 | 1.3kb | 2023-08-17 15:18:18 | 2023-08-17 15:18:21 |
Judging History
answer
/*
Problem: F. Full Clue Problem
Contest: qoj
URL: https://qoj.ac/contest/1195/problem/6189
===================
Memory Limit: 1024.0MB
TimeLimit: 1.0s
*/
#include <iostream>
const int MAXN = 29;
using namespace std;
int hsh[MAXN][MAXN], N;
bool ans1[MAXN][MAXN], ans2[MAXN][MAXN];
int main () {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cerr.tie(0);
cin >> N;
if (N == 2) {
cout << "23\n32\n\n11\n10\n\n01\n11\n";
return 0;
}
if (N == 3) {
cout << "222\n202\n222\n\n110\n111\n011\n\n011\n111\n110\n";
return 0;
}
for (int i = 1; i < N-1; i++) hsh[i][i+2] = hsh[i+2][i] = 1;
for (int i = 1; i < N+1; i++) hsh[i][i] = 2;
for (int i = 1; i < N; i++) hsh[i][i+1] = hsh[i+1][i] = 2;
hsh[1][1] = hsh[N][N] = 3;
for (int i = 1; i < N+1; i++) ans1[i][i] = 1;
for (int i = 1; i < N+1; i+=2) ans1[i+1][i] = ans1[i+1][i+2] = 1;
for (int i = 1; i < N+1; i++)
for (int m = 1; m < N+1; m++) ans2[i][m] = ans1[m][i];
for (int i = 1; i < N+1; i++) {
for (int m = 1; m < N+1; m++) cout << hsh[i][m] << ' ';
cout << '\n';
}
cout << '\n';
for (int i = 1; i < N+1; i++) {
for (int m = 1; m < N+1; m++) cout << ans1[i][m] << ' ';
cout << '\n';
}
cout << '\n';
for (int i = 1; i < N+1; i++) {
for (int m = 1; m < N+1; m++) cout << ans2[i][m] << ' ';
cout << '\n';
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3632kb
input:
5
output:
3 2 1 0 0 2 2 2 1 0 1 2 2 2 1 0 1 2 2 2 0 0 1 2 3 1 0 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 1 1
result:
ok ok
Test #2:
score: -100
Wrong Answer
time: 1ms
memory: 3532kb
input:
2
output:
23 32 11 10 01 11
result:
wrong answer Integer parameter [name=a[i][j]] equals to 23, violates the range [0, 4]