QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#263593#6189. Full Clue ProblemCrysflyAC ✓0ms3660kbC++17322b2023-11-24 23:18:502023-11-24 23:18:51

Judging History

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

  • [2023-11-24 23:18:51]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3660kb
  • [2023-11-24 23:18:50]
  • 提交

answer

#include<iostream>
#define L(i,b) for(int i=1;i<=b;++i)
using namespace std;
int main(){
	int n;cin>>n;
	L(i,n)L(j,n)cout<<(abs(i-j)<2?((i==j&&(i==1||i==n))+2):(abs(i-j)==2))<<" \n"[j==n];
	L(i,n)L(j,n)cout<<(i==j?1:(abs(i-j)==1?i%2:0))<<" \n"[j==n];
	L(i,n)L(j,n)cout<<(i==j?1:(abs(i-j)==1?j%2:0))<<" \n"[j==n];
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3628kb

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 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:

ok ok

Test #2:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

2

output:

3 2
2 3
1 1
0 1
1 0
1 1

result:

ok ok

Test #3:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

3

output:

3 2 1
2 2 2
1 2 3
1 1 0
0 1 0
0 1 1
1 0 0
1 1 1
0 0 1

result:

ok ok

Test #4:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

4

output:

3 2 1 0
2 2 2 1
1 2 2 2
0 1 2 3
1 1 0 0
0 1 0 0
0 1 1 1
0 0 0 1
1 0 0 0
1 1 1 0
0 0 1 0
0 0 1 1

result:

ok ok

Test #5:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

10

output:

3 2 1 0 0 0 0 0 0 0
2 2 2 1 0 0 0 0 0 0
1 2 2 2 1 0 0 0 0 0
0 1 2 2 2 1 0 0 0 0
0 0 1 2 2 2 1 0 0 0
0 0 0 1 2 2 2 1 0 0
0 0 0 0 1 2 2 2 1 0
0 0 0 0 0 1 2 2 2 1
0 0 0 0 0 0 1 2 2 2
0 0 0 0 0 0 0 1 2 3
1 1 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0
0 1 1 1 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0
0 0 0 1 1 1 0 0 0 0
...

result:

ok ok

Test #6:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

19

output:

3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 2 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 2 2 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 2 2 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 2 2 2 1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 2 2 2 1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 2 2 2 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 2 2 2 1 0 0 0 0 0 0 0 ...

result:

ok ok

Test #7:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

20

output:

3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 2 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 2 2 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 2 2 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 2 2 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 2 2 2 1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 2 2 2 1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 2 2 2 1 ...

result:

ok ok