QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#192761 | #4902. 聚会 | Crysfly | 0 | 1ms | 5768kb | C++17 | 1.4kb | 2023-09-30 15:26:38 | 2023-09-30 15:26:39 |
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,k,a[maxn];
int g[5005][5005];
signed main()
{
cin>>n;
k=n/3;
For(i,0,k-1)a[i]=i/2+i%2*((k+1)/2)+1;
// For(i,0,k-1)cout<<a[i]<<" \n"[i==k-1];
if(n%6==3){
k=n/3;
For(i,0,k-1)a[i]=i/2+i%2*(k/2+1)+1;
For(i,1,k)cout<<i<<" "<<i+k<<" "<<i+k*2<<"\n";
For(i,1,k)For(j,i+1,k)For(c,0,2)cout<<i+c*k<<" "<<j+c*k<<" "<<a[(i+j-2)%k]+(c+1)%3*k<<"\n";
}
For(i,0,k-1)For(j,i+1,k-1){
int x=a[(i+j)%k];
g[i][x]++;
g[j][x]++;
For(c,0,2)cout<<i+c*k+1<<" "<<j+c*k+1<<" "<<x+(c+1)%3*k+1<<"\n";
}
// For(i,0,k-1)For(j,0,k-1)cout<<g[i][j]<<" \n"[j==k-1];
For(i,1,k/2)cout<<i<<" "<<i+k<<" "<<i+k*2<<"\n";
For(i,1,k/2)For(c,0,2)cout<<n<<" "<<i+k/2+c*k<<" "<<i+(c+1)%3*k<<"\n";
return 0;
}
/*
*/
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 9.09091
Accepted
time: 0ms
memory: 3672kb
input:
1
output:
result:
ok accepted
Test #2:
score: 0
Accepted
time: 1ms
memory: 5612kb
input:
3
output:
1 2 3
result:
ok accepted
Test #3:
score: -9.09091
Wrong Answer
time: 1ms
memory: 5736kb
input:
7
output:
1 2 5 3 4 7 5 6 3 1 3 5 7 2 3 7 4 5 7 6 1
result:
wrong answer wrong construction
Subtask #2:
score: 0
Wrong Answer
Test #12:
score: 9.09091
Accepted
time: 1ms
memory: 5664kb
input:
3
output:
1 2 3
result:
ok accepted
Test #13:
score: -9.09091
Wrong Answer
time: 1ms
memory: 5620kb
input:
9
output:
1 4 7 2 5 8 3 6 9 1 2 6 4 5 9 7 8 3 1 3 5 4 6 8 7 9 2 2 3 4 5 6 7 8 9 1 1 2 7 4 5 10 7 8 4 1 3 6 4 6 9 7 9 3 2 3 5 5 6 8 8 9 2 1 4 7 9 2 4 9 5 7 9 8 1
result:
wrong output format Extra information in the output file
Subtask #3:
score: 0
Wrong Answer
Test #19:
score: 9.09091
Accepted
time: 0ms
memory: 3680kb
input:
1
output:
result:
ok accepted
Test #20:
score: -9.09091
Wrong Answer
time: 1ms
memory: 5640kb
input:
25
output:
1 2 14 9 10 22 17 18 6 1 3 11 9 11 19 17 19 3 1 4 15 9 12 23 17 20 7 1 5 12 9 13 20 17 21 4 1 6 16 9 14 24 17 22 8 1 7 13 9 15 21 17 23 5 1 8 17 9 16 25 17 24 9 2 3 15 10 11 23 18 19 7 2 4 12 10 12 20 18 20 4 2 5 16 10 13 24 18 21 8 2 6 13 10 14 21 18 22 5 2 7 17 10 15 25 18 23 9 2 8 10 10 16 18 18 ...
result:
wrong answer wrong construction
Subtask #4:
score: 0
Wrong Answer
Test #24:
score: 0
Wrong Answer
time: 1ms
memory: 5664kb
input:
7
output:
1 2 5 3 4 7 5 6 3 1 3 5 7 2 3 7 4 5 7 6 1
result:
wrong answer wrong construction
Subtask #5:
score: 0
Wrong Answer
Test #29:
score: 0
Wrong Answer
time: 1ms
memory: 5728kb
input:
13
output:
1 2 8 5 6 12 9 10 4 1 3 7 5 7 11 9 11 3 1 4 9 5 8 13 9 12 5 2 3 9 6 7 13 10 11 5 2 4 6 6 8 10 10 12 2 3 4 8 7 8 12 11 12 4 1 5 9 2 6 10 13 3 5 13 7 9 13 11 1 13 4 6 13 8 10 13 12 2
result:
wrong answer wrong construction
Subtask #6:
score: 0
Wrong Answer
Test #34:
score: 0
Wrong Answer
time: 1ms
memory: 5668kb
input:
19
output:
1 2 11 7 8 17 13 14 5 1 3 9 7 9 15 13 15 3 1 4 12 7 10 18 13 16 6 1 5 10 7 11 16 13 17 4 1 6 13 7 12 19 13 18 7 2 3 12 8 9 18 14 15 6 2 4 10 8 10 16 14 16 4 2 5 13 8 11 19 14 17 7 2 6 8 8 12 14 14 18 2 3 4 13 9 10 19 15 16 7 3 5 8 9 11 14 15 17 2 3 6 11 9 12 17 15 18 5 4 5 11 10 11 17 16 17 5 4 6 9 ...
result:
wrong answer wrong construction
Subtask #7:
score: 0
Wrong Answer
Test #39:
score: 9.09091
Accepted
time: 0ms
memory: 3628kb
input:
3
output:
1 2 3
result:
ok accepted
Test #40:
score: -9.09091
Wrong Answer
time: 1ms
memory: 5768kb
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 15 10 11 24 19 20 6 1 3 11 10 12 20 19 21 2 1 4 16 10 13 25 19 22 7 1 5 12 10 14 21 19 23 3 1 6 17 10 15 26 19 24 8 1 7 13 10 16 22 19 25 4 1 8 18 10 17 27 19 26 9 1 9 14 10 18 23 19 27 5 2 3 16 11 12 25 20 21 7 2 4 12 11 13...
result:
wrong output format Extra information in the output file
Subtask #8:
score: 0
Wrong Answer
Test #44:
score: 0
Wrong Answer
time: 1ms
memory: 5716kb
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 12 8 9 19 15 16 5 1 3 9 8 10 16 15 17 2 1 4 13 8 11 20 15 18 6 1 5 10 8 12 17 15 19 3 1 6 14 8 13 21 15 20 7 1 7 11 8 14 18 15 21 4 2 3 13 9 10 20 16 17 6 2 4 10 9 11 17 16 18 3 2 5 14 9 12 21 16 19 7 2 6 11 9 13 18 16 20 4 2 7 8 9 14 15 16 2...
result:
wrong output format Extra information in the output file
Subtask #9:
score: 0
Wrong Answer
Test #49:
score: 0
Wrong Answer
time: 1ms
memory: 5668kb
input:
9
output:
1 4 7 2 5 8 3 6 9 1 2 6 4 5 9 7 8 3 1 3 5 4 6 8 7 9 2 2 3 4 5 6 7 8 9 1 1 2 7 4 5 10 7 8 4 1 3 6 4 6 9 7 9 3 2 3 5 5 6 8 8 9 2 1 4 7 9 2 4 9 5 7 9 8 1
result:
wrong output format Extra information in the output file
Subtask #10:
score: 0
Wrong Answer
Test #54:
score: 0
Wrong Answer
time: 0ms
memory: 5688kb
input:
15
output:
1 6 11 2 7 12 3 8 13 4 9 14 5 10 15 1 2 9 6 7 14 11 12 4 1 3 7 6 8 12 11 13 2 1 4 10 6 9 15 11 14 5 1 5 8 6 10 13 11 15 3 2 3 10 7 8 15 12 13 5 2 4 8 7 9 13 12 14 3 2 5 6 7 10 11 12 15 1 3 4 6 8 9 11 13 14 1 3 5 9 8 10 14 13 15 4 4 5 7 9 10 12 14 15 2 1 2 10 6 7 15 11 12 5 1 3 8 6 8 13 11 13 3 1 4 1...
result:
wrong output format Extra information in the output file
Subtask #11:
score: 0
Skipped
Dependency #1:
0%