QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#234297 | #4902. 聚会 | zhouhuanyi | 0 | 1ms | 3972kb | C++23 | 517b | 2023-11-01 15:40:33 | 2023-11-01 15:40:33 |
answer
#include<iostream>
#include<cstdio>
using namespace std;
int read()
{
char c=0;
int sum=0;
while (c<'0'||c>'9') c=getchar();
while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=getchar();
return sum;
}
int n,t;
int main()
{
n=read();
if (n%6==3)
{
t=n/3;
for (int i=0;i<t;++i) printf("%d %d %d\n",i+1,i+t+1,i+(t<<1)+1);
for (int i=0;i<3;++i)
for (int j=0;j<t;++j)
for (int k=j+1;k<t;++k)
printf("%d %d %d\n",i*t+j+1,i*t+k+1,((i+1)%3)*t+(j+k)*((n+1)>>1)%n+1);
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 9.09091
Accepted
time: 0ms
memory: 3664kb
input:
1
output:
result:
ok accepted
Test #2:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
3
output:
1 2 3
result:
ok accepted
Test #3:
score: -9.09091
Wrong Answer
time: 0ms
memory: 3584kb
input:
7
output:
result:
wrong output format Unexpected end of file - int32 expected
Subtask #2:
score: 0
Wrong Answer
Test #12:
score: 9.09091
Accepted
time: 0ms
memory: 3904kb
input:
3
output:
1 2 3
result:
ok accepted
Test #13:
score: -9.09091
Wrong Answer
time: 0ms
memory: 3804kb
input:
9
output:
1 4 7 2 5 8 3 6 9 1 2 9 1 3 5 2 3 10 4 5 12 4 6 8 5 6 13 7 8 6 7 9 2 8 9 7
result:
wrong answer Integer parameter [name=c] equals to 10, violates the range [1, 9]
Subtask #3:
score: 0
Wrong Answer
Test #19:
score: 9.09091
Accepted
time: 0ms
memory: 3664kb
input:
1
output:
result:
ok accepted
Test #20:
score: -9.09091
Wrong Answer
time: 0ms
memory: 3648kb
input:
25
output:
result:
wrong output format Unexpected end of file - int32 expected
Subtask #4:
score: 0
Wrong Answer
Test #24:
score: 0
Wrong Answer
time: 0ms
memory: 3652kb
input:
7
output:
result:
wrong output format Unexpected end of file - int32 expected
Subtask #5:
score: 0
Wrong Answer
Test #29:
score: 0
Wrong Answer
time: 1ms
memory: 3576kb
input:
13
output:
result:
wrong output format Unexpected end of file - int32 expected
Subtask #6:
score: 0
Wrong Answer
Test #34:
score: 0
Wrong Answer
time: 1ms
memory: 3732kb
input:
19
output:
result:
wrong output format Unexpected end of file - int32 expected
Subtask #7:
score: 0
Wrong Answer
Test #39:
score: 9.09091
Accepted
time: 0ms
memory: 3852kb
input:
3
output:
1 2 3
result:
ok accepted
Test #40:
score: -9.09091
Wrong Answer
time: 1ms
memory: 3972kb
input:
27
output:
1 10 19 2 11 20 3 12 21 4 13 22 5 14 23 6 15 24 7 16 25 8 17 26 9 18 27 1 2 24 1 3 11 1 4 25 1 5 12 1 6 26 1 7 13 1 8 27 1 9 14 2 3 25 2 4 12 2 5 26 2 6 13 2 7 27 2 8 14 2 9 28 3 4 26 3 5 13 3 6 27 3 7 14 3 8 28 3 9 15 4 5 27 4 6 14 4 7 28 4 8 15 4 9 29 5 6 28 5 7 15 5 8 29 5 9 16 6 7 29 6 8 16 6 9 ...
result:
wrong answer Integer parameter [name=c] equals to 28, violates the range [1, 27]
Subtask #8:
score: 0
Wrong Answer
Test #44:
score: 0
Wrong Answer
time: 0ms
memory: 3820kb
input:
21
output:
1 8 15 2 9 16 3 10 17 4 11 18 5 12 19 6 13 20 7 14 21 1 2 19 1 3 9 1 4 20 1 5 10 1 6 21 1 7 11 2 3 20 2 4 10 2 5 21 2 6 11 2 7 22 3 4 21 3 5 11 3 6 22 3 7 12 4 5 22 4 6 12 4 7 23 5 6 23 5 7 13 6 7 24 8 9 26 8 10 16 8 11 27 8 12 17 8 13 28 8 14 18 9 10 27 9 11 17 9 12 28 9 13 18 9 14 29 10 11 28 10 1...
result:
wrong answer Integer parameter [name=c] equals to 22, violates the range [1, 21]
Subtask #9:
score: 0
Wrong Answer
Test #49:
score: 0
Wrong Answer
time: 0ms
memory: 3856kb
input:
9
output:
1 4 7 2 5 8 3 6 9 1 2 9 1 3 5 2 3 10 4 5 12 4 6 8 5 6 13 7 8 6 7 9 2 8 9 7
result:
wrong answer Integer parameter [name=c] equals to 10, violates the range [1, 9]
Subtask #10:
score: 0
Wrong Answer
Test #54:
score: 0
Wrong Answer
time: 0ms
memory: 3848kb
input:
15
output:
1 6 11 2 7 12 3 8 13 4 9 14 5 10 15 1 2 14 1 3 7 1 4 15 1 5 8 2 3 15 2 4 8 2 5 16 3 4 16 3 5 9 4 5 17 6 7 19 6 8 12 6 9 20 6 10 13 7 8 20 7 9 13 7 10 21 8 9 21 8 10 14 9 10 22 11 12 9 11 13 2 11 14 10 11 15 3 12 13 10 12 14 3 12 15 11 13 14 11 13 15 4 14 15 12
result:
wrong answer Integer parameter [name=c] equals to 16, violates the range [1, 15]
Subtask #11:
score: 0
Skipped
Dependency #1:
0%