QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#558037 | #8934. Challenge NPC | leafmaple# | WA | 1ms | 3752kb | C++20 | 955b | 2024-09-11 13:41:34 | 2024-09-11 13:41:34 |
Judging History
answer
#include <bits/stdc++.h>
#define xs(a) cout<<setiosflags(ios::fixed)<<setprecision(a);
#define endl '\n'
using namespace std;
using ll = long long;
const int N=1e6+5;
#define int long long
void solve(){
int k; cin >> k;
vector<array<int,2>>edg;
int cnt = 0;
/*
1 2 3
1 2 3
*/
int n = 2*k+4;
for(int i=3; i<=n; i++){
if(i%2 == 1){
for(int j=2; j<=n; j+=2) edg.push_back({i, j});
}else {
for(int j=1; j<=i-2; j+=2) edg.push_back({i, j});
}
}
cout << n << ' ' << edg.size() << ' ' << 2 << endl;
cout << "1 1 ";
for(int i=3; i<=n; i++){
if(i%2) cout << 1 << ' ';
else cout << 2 << ' ';
}
cout<<endl;
for(auto [x, y]: edg){
cout << x << ' ' << y << endl;
}
}
signed main(){
cin.tie(0)->sync_with_stdio(0);
int T; T=1;
// cin >> T;
while(T--) solve();
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3752kb
input:
1
output:
6 9 2 1 1 1 2 1 2 3 2 3 4 3 6 4 1 5 2 5 4 5 6 6 1 6 3
result:
wrong answer The graph is not correct