QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#601984 | #8934. Challenge NPC | racxa# | AC ✓ | 21ms | 9380kb | C++14 | 837b | 2024-09-30 17:17:44 | 2024-09-30 17:17:45 |
Judging History
answer
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
#define ff first
#define ss second
using namespace std;
const int N = 2e5 + 10;
vector<int> g[N];
int main() {
ios_base::sync_with_stdio(false); cin.tie(0);
int k;
cin >> k;
int edges = 0;
int n = (k + 2);
for(int i = 1; i <= 2 * n; i++) {
int start = (i & 1 ? i - 1 : i - 3);
for(int j = start; j > 0; j -= 2) {
g[i].push_back(j);
edges++;
}
}
cout << 2 * n << " " << edges << " " << 2 << "\n";
for(int i = 1; i <= 2 * n; i++) {
cout << (i % 2) + 1 << " ";
}
cout << "\n";
for(int v = 1; v <= 2 * n; v++) {
for(int u : g[v]) {
cout << v << " " << u << "\n";
}
}
return 0;
}
这程序好像有点Bug,我给组数据试试?
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 8364kb
input:
1
output:
6 6 2 2 1 2 1 2 1 3 2 4 1 5 4 5 2 6 3 6 1
result:
ok ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 8336kb
input:
2
output:
8 12 2 2 1 2 1 2 1 2 1 3 2 4 1 5 4 5 2 6 3 6 1 7 6 7 4 7 2 8 5 8 3 8 1
result:
ok ok
Test #3:
score: 0
Accepted
time: 2ms
memory: 8340kb
input:
3
output:
10 20 2 2 1 2 1 2 1 2 1 2 1 3 2 4 1 5 4 5 2 6 3 6 1 7 6 7 4 7 2 8 5 8 3 8 1 9 8 9 6 9 4 9 2 10 7 10 5 10 3 10 1
result:
ok ok
Test #4:
score: 0
Accepted
time: 2ms
memory: 8280kb
input:
4
output:
12 30 2 2 1 2 1 2 1 2 1 2 1 2 1 3 2 4 1 5 4 5 2 6 3 6 1 7 6 7 4 7 2 8 5 8 3 8 1 9 8 9 6 9 4 9 2 10 7 10 5 10 3 10 1 11 10 11 8 11 6 11 4 11 2 12 9 12 7 12 5 12 3 12 1
result:
ok ok
Test #5:
score: 0
Accepted
time: 2ms
memory: 8408kb
input:
5
output:
14 42 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 3 2 4 1 5 4 5 2 6 3 6 1 7 6 7 4 7 2 8 5 8 3 8 1 9 8 9 6 9 4 9 2 10 7 10 5 10 3 10 1 11 10 11 8 11 6 11 4 11 2 12 9 12 7 12 5 12 3 12 1 13 12 13 10 13 8 13 6 13 4 13 2 14 11 14 9 14 7 14 5 14 3 14 1
result:
ok ok
Test #6:
score: 0
Accepted
time: 19ms
memory: 9084kb
input:
433
output:
870 188790 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1...
result:
ok ok
Test #7:
score: 0
Accepted
time: 20ms
memory: 9352kb
input:
500
output:
1004 251502 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 ...
result:
ok ok
Test #8:
score: 0
Accepted
time: 20ms
memory: 9380kb
input:
499
output:
1002 250500 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 ...
result:
ok ok
Test #9:
score: 0
Accepted
time: 17ms
memory: 9192kb
input:
457
output:
918 210222 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1...
result:
ok ok
Test #10:
score: 0
Accepted
time: 21ms
memory: 9348kb
input:
497
output:
998 248502 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1...
result:
ok ok
Extra Test:
score: 0
Extra Test Passed