QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#695490 | #8934. Challenge NPC | lonelywolf# | AC ✓ | 20ms | 9452kb | C++20 | 603b | 2024-10-31 20:08:35 | 2024-10-31 20:08:39 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int k;
cin >> k;
k += 2;
vector<pair<int, int>> e;
for (int i = 1; i <= k; i++) {
for (int j = 1; j < i; j++) {
e.push_back({2 * j - 1, 2 * i});
e.push_back({2 * i - 1, 2 * j});
}
}
cout << 2 * k << " " << e.size() << " " << 2 << "\n";
for (int i = 1; i <= k; i++) {
cout << 1 << " " << 2 << " \n"[i == k];
}
for (auto [x, y] : e) {
cout << x << " " << y << "\n";
}
return 0;
}
这程序好像有点Bug,我给组数据试试?
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3504kb
input:
1
output:
6 6 2 1 2 1 2 1 2 1 4 3 2 1 6 5 2 3 6 5 4
result:
ok ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 3500kb
input:
2
output:
8 12 2 1 2 1 2 1 2 1 2 1 4 3 2 1 6 5 2 3 6 5 4 1 8 7 2 3 8 7 4 5 8 7 6
result:
ok ok
Test #3:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
3
output:
10 20 2 1 2 1 2 1 2 1 2 1 2 1 4 3 2 1 6 5 2 3 6 5 4 1 8 7 2 3 8 7 4 5 8 7 6 1 10 9 2 3 10 9 4 5 10 9 6 7 10 9 8
result:
ok ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
4
output:
12 30 2 1 2 1 2 1 2 1 2 1 2 1 2 1 4 3 2 1 6 5 2 3 6 5 4 1 8 7 2 3 8 7 4 5 8 7 6 1 10 9 2 3 10 9 4 5 10 9 6 7 10 9 8 1 12 11 2 3 12 11 4 5 12 11 6 7 12 11 8 9 12 11 10
result:
ok ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
5
output:
14 42 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 4 3 2 1 6 5 2 3 6 5 4 1 8 7 2 3 8 7 4 5 8 7 6 1 10 9 2 3 10 9 4 5 10 9 6 7 10 9 8 1 12 11 2 3 12 11 4 5 12 11 6 7 12 11 8 9 12 11 10 1 14 13 2 3 14 13 4 5 14 13 6 7 14 13 8 9 14 13 10 11 14 13 12
result:
ok ok
Test #6:
score: 0
Accepted
time: 18ms
memory: 7460kb
input:
433
output:
870 188790 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 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 #7:
score: 0
Accepted
time: 20ms
memory: 8508kb
input:
500
output:
1004 251502 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 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 #8:
score: 0
Accepted
time: 19ms
memory: 9452kb
input:
499
output:
1002 250500 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 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 #9:
score: 0
Accepted
time: 16ms
memory: 8692kb
input:
457
output:
918 210222 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 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 #10:
score: 0
Accepted
time: 19ms
memory: 7728kb
input:
497
output:
998 248502 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 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
Extra Test:
score: 0
Extra Test Passed