QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#263582 | #6189. Full Clue Problem | Crysfly | WA | 0ms | 3580kb | C++17 | 1.3kb | 2023-11-24 23:10:09 | 2023-11-24 23:10:10 |
Judging History
answer
// what is matter? never mind.
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,avx2")
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
#define ull unsigned long long
using namespace std;
inline int read()
{
char c=getchar();int x=0;bool f=0;
for(;!isdigit(c);c=getchar())f^=!(c^45);
for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
if(f)x=-x;return x;
}
#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;
#define maxn 500005
#define inf 0x3f3f3f3f
int n,a[25][25],b[25][25],c[25][25];
signed main()
{
n=read();
a[0][0]=a[0][1]=a[1][1]=1;
b[0][0]=b[1][0]=b[1][1]=1;
For(i,2,n-1){
a[i][i]=b[i][i]=1;
if(i&1^1)a[i][i-1]=b[i-1][i]=1;
else a[i-1][i]=b[i][i-1]=1;
}
For(i,0,n-1)
For(j,0,n-1){
int d=abs(i-j);
if(d==0)c[i][j]=3;
if(d==1)c[i][j]=2;
if(d==2)c[i][j]=1;
}
For(i,0,n-1)For(j,0,n-1)cout<<c[i][j]<<" \n"[j==n-1];
For(i,0,n-1)For(j,0,n-1)cout<<a[i][j]<<" \n"[j==n-1];
For(i,0,n-1)For(j,0,n-1)cout<<b[i][j]<<" \n"[j==n-1];
return 0;
}
/*
*/
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3580kb
input:
5
output:
3 2 1 0 0 2 3 2 1 0 1 2 3 2 1 0 1 2 3 2 0 0 1 2 3 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 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
result:
wrong answer (1, 1) doesn't satisfy with clues