QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#209330 | #6319. Parallel Processing (Easy) | ucup-team870# | AC ✓ | 0ms | 3864kb | C++14 | 1.8kb | 2023-10-10 14:02:35 | 2023-10-10 14:02:36 |
Judging History
answer
#include <bits/stdc++.h>
#define For(i,l,r) for(int i=l; i<=r; i++)
#define per(i,r,l) for(int i=r; i>=l; i--)
#define IOS {cin.tie(0);cout.tie(0);ios::sync_with_stdio(0);}
using namespace std;
int a1[][3]={
{2,1,2},{4,3,4},{6,5,6},{8,7,8},
{3,2,3},{4,2,4},{7,6,7},{8,6,8},
{5,4,5},{6,4,6},{7,4,7},{8,4,8}
};
int a2[][3]={
{2,1,2},{4,3,4},{6,5,6},{9,8,9},
{3,2,3},{4,2,4},{7,6,7},{10,9,10},
{5,4,5},{6,4,6},{7,4,7},{11,10,11},
{8,7,8},{9,7,9},{10,7,10},{11,7,11}
};
int a3[][3]={
{2,1,2},{4,3,4},{6,5,6},{9,8,9},
{3,2,3},{4,2,4},{7,6,7},{10,9,10},
{5,4,5},{6,4,6},{7,4,7},{12,11,12},
{8,7,8},{9,7,9},{10,7,10},{13,12,13},
{11,10,11},{12,10,12},{13,10,13},{2000,2000,2000}
};
int a4[][3]={
{2,1,2},{4,3,4},{6,5,6},{8,7,8},
{3,2,3},{4,2,4},{9,8,9},{11,10,11},
{5,4,5},{6,4,6},{12,11,12},{14,13,14},
{7,6,7},{8,6,8},{9,6,9},{15,14,15},
{10,9,10},{11,9,11},{12,9,12},{16,15,16},
{13,12,13},{14,12,14},{15,12,15},{16,12,16}
};
int main(){
int n; cin>>n;
if (n<=8){
int m;
if (n<=2) m=1;
else if (n<=4) m=2;
else m=3;
printf("%d\n",m);
For(i,0,m*4-1){
For(j,0,2) printf("%d ",a1[i][j]);
printf("\n");
}
exit(0);
}
if (n<=11){
int m=4; printf("%d\n",m);
For(i,0,m*4-1){
For(j,0,2) printf("%d ",a2[i][j]);
printf("\n");
}
exit(0);
}
if (n<=13){
int m=5; printf("%d\n",m);
For(i,0,m*4-1){
For(j,0,2) printf("%d ",a3[i][j]);
printf("\n");
}
exit(0);
}
if (n<=16){
int m=6; printf("%d\n",m);
For(i,0,m*4-1){
For(j,0,2) printf("%d ",a4[i][j]);
printf("\n");
}
exit(0);
}
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3788kb
input:
2
output:
1 2 1 2 4 3 4 6 5 6 8 7 8
result:
ok AC
Test #2:
score: 0
Accepted
time: 0ms
memory: 3848kb
input:
4
output:
2 2 1 2 4 3 4 6 5 6 8 7 8 3 2 3 4 2 4 7 6 7 8 6 8
result:
ok AC
Test #3:
score: 0
Accepted
time: 0ms
memory: 3860kb
input:
3
output:
2 2 1 2 4 3 4 6 5 6 8 7 8 3 2 3 4 2 4 7 6 7 8 6 8
result:
ok AC
Test #4:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
5
output:
3 2 1 2 4 3 4 6 5 6 8 7 8 3 2 3 4 2 4 7 6 7 8 6 8 5 4 5 6 4 6 7 4 7 8 4 8
result:
ok AC
Test #5:
score: 0
Accepted
time: 0ms
memory: 3860kb
input:
6
output:
3 2 1 2 4 3 4 6 5 6 8 7 8 3 2 3 4 2 4 7 6 7 8 6 8 5 4 5 6 4 6 7 4 7 8 4 8
result:
ok AC
Test #6:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
7
output:
3 2 1 2 4 3 4 6 5 6 8 7 8 3 2 3 4 2 4 7 6 7 8 6 8 5 4 5 6 4 6 7 4 7 8 4 8
result:
ok AC
Test #7:
score: 0
Accepted
time: 0ms
memory: 3844kb
input:
8
output:
3 2 1 2 4 3 4 6 5 6 8 7 8 3 2 3 4 2 4 7 6 7 8 6 8 5 4 5 6 4 6 7 4 7 8 4 8
result:
ok AC
Test #8:
score: 0
Accepted
time: 0ms
memory: 3780kb
input:
9
output:
4 2 1 2 4 3 4 6 5 6 9 8 9 3 2 3 4 2 4 7 6 7 10 9 10 5 4 5 6 4 6 7 4 7 11 10 11 8 7 8 9 7 9 10 7 10 11 7 11
result:
ok AC
Test #9:
score: 0
Accepted
time: 0ms
memory: 3852kb
input:
10
output:
4 2 1 2 4 3 4 6 5 6 9 8 9 3 2 3 4 2 4 7 6 7 10 9 10 5 4 5 6 4 6 7 4 7 11 10 11 8 7 8 9 7 9 10 7 10 11 7 11
result:
ok AC
Test #10:
score: 0
Accepted
time: 0ms
memory: 3860kb
input:
11
output:
4 2 1 2 4 3 4 6 5 6 9 8 9 3 2 3 4 2 4 7 6 7 10 9 10 5 4 5 6 4 6 7 4 7 11 10 11 8 7 8 9 7 9 10 7 10 11 7 11
result:
ok AC
Test #11:
score: 0
Accepted
time: 0ms
memory: 3844kb
input:
12
output:
5 2 1 2 4 3 4 6 5 6 9 8 9 3 2 3 4 2 4 7 6 7 10 9 10 5 4 5 6 4 6 7 4 7 12 11 12 8 7 8 9 7 9 10 7 10 13 12 13 11 10 11 12 10 12 13 10 13 2000 2000 2000
result:
ok AC
Test #12:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
13
output:
5 2 1 2 4 3 4 6 5 6 9 8 9 3 2 3 4 2 4 7 6 7 10 9 10 5 4 5 6 4 6 7 4 7 12 11 12 8 7 8 9 7 9 10 7 10 13 12 13 11 10 11 12 10 12 13 10 13 2000 2000 2000
result:
ok AC
Test #13:
score: 0
Accepted
time: 0ms
memory: 3848kb
input:
14
output:
6 2 1 2 4 3 4 6 5 6 8 7 8 3 2 3 4 2 4 9 8 9 11 10 11 5 4 5 6 4 6 12 11 12 14 13 14 7 6 7 8 6 8 9 6 9 15 14 15 10 9 10 11 9 11 12 9 12 16 15 16 13 12 13 14 12 14 15 12 15 16 12 16
result:
ok AC
Test #14:
score: 0
Accepted
time: 0ms
memory: 3864kb
input:
15
output:
6 2 1 2 4 3 4 6 5 6 8 7 8 3 2 3 4 2 4 9 8 9 11 10 11 5 4 5 6 4 6 12 11 12 14 13 14 7 6 7 8 6 8 9 6 9 15 14 15 10 9 10 11 9 11 12 9 12 16 15 16 13 12 13 14 12 14 15 12 15 16 12 16
result:
ok AC
Test #15:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
16
output:
6 2 1 2 4 3 4 6 5 6 8 7 8 3 2 3 4 2 4 9 8 9 11 10 11 5 4 5 6 4 6 12 11 12 14 13 14 7 6 7 8 6 8 9 6 9 15 14 15 10 9 10 11 9 11 12 9 12 16 15 16 13 12 13 14 12 14 15 12 15 16 12 16
result:
ok AC