QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#353864 | #6189. Full Clue Problem | matongc233 | WA | 0ms | 3736kb | C++17 | 1.1kb | 2024-03-14 18:13:12 | 2024-03-14 18:13:13 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int N = 22;
typedef long long ll;
typedef pair<int, int> PII;
int g[N][N];
int main()
{
int n;
cin >> n;
int k = 4 * n / (3 +2* (n - 2));
for (int i = 0; i < n;i++){
for (int j = 0; j < n;j++){
if(abs(i-j)<=1){
g[i][j] = k;
}
}
}
g[0][0]++;
g[n - 1][n - 1]++;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
printf("%d", g[i][j]);
}
puts("");
}
puts("");
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if(i-j==1||i-j==0)printf("%d", 1);
else
printf("%d", 0);
}
puts("");
}
puts("");
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if (j-i == 1 || i - j == 0)
printf("%d", 1);
else
printf("%d", 0);
}
puts("");
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3736kb
input:
5
output:
32000 22200 02220 00222 00023 10000 11000 01100 00110 00011 11000 01100 00110 00011 00001
result:
wrong answer Integer parameter [name=a[i][j]] equals to 32000, violates the range [0, 4]