QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#788328 | #8934. Challenge NPC | 0x3f | AC ✓ | 24ms | 5340kb | C++14 | 993b | 2024-11-27 16:34:11 | 2024-11-27 16:34:19 |
Judging History
answer
// Problem: C. Challenge NPC
// Contest: The 3rd Universal Cup. Stage 8: Cangqian
// URL: https://qoj.ac/contest/1780/problem/8934
// Author: Fourier_WJY
// Memory Limit: 1024 MB
// Time Limit: 1000 ms
// Copyright (c) 2023 Fourier All rights reserved.
//
// Powered by CP Editor (https://cpeditor.org)
#include <bits/stdc++.h>
#define ll long long
using namespace std;
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int k;
cin >> k;
int n = 2 * k + 4;
vector<pair<int, int>> e;
for (int i = 1; i <= n; i += 2)
for (int j = 2; j < i; j += 2) e.push_back({j, i});
for (int i = 2; i <= n; i += 2)
for (int j = 1; j < i - 1; j += 2) e.push_back({j, i});
cout << n << " " << e.size() << " " << 2 << "\n";
for (int i = 1; i <= n / 2; i++)
cout << "1 2"
<< " \n"[i == n / 2];
for (auto it : e) cout << it.first << " " << it.second << "\n";
return 0;
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3564kb
input:
1
output:
6 6 2 1 2 1 2 1 2 2 3 2 5 4 5 1 4 1 6 3 6
result:
ok ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
2
output:
8 12 2 1 2 1 2 1 2 1 2 2 3 2 5 4 5 2 7 4 7 6 7 1 4 1 6 3 6 1 8 3 8 5 8
result:
ok ok
Test #3:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
3
output:
10 20 2 1 2 1 2 1 2 1 2 1 2 2 3 2 5 4 5 2 7 4 7 6 7 2 9 4 9 6 9 8 9 1 4 1 6 3 6 1 8 3 8 5 8 1 10 3 10 5 10 7 10
result:
ok ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
4
output:
12 30 2 1 2 1 2 1 2 1 2 1 2 1 2 2 3 2 5 4 5 2 7 4 7 6 7 2 9 4 9 6 9 8 9 2 11 4 11 6 11 8 11 10 11 1 4 1 6 3 6 1 8 3 8 5 8 1 10 3 10 5 10 7 10 1 12 3 12 5 12 7 12 9 12
result:
ok ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
5
output:
14 42 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 2 3 2 5 4 5 2 7 4 7 6 7 2 9 4 9 6 9 8 9 2 11 4 11 6 11 8 11 10 11 2 13 4 13 6 13 8 13 10 13 12 13 1 4 1 6 3 6 1 8 3 8 5 8 1 10 3 10 5 10 7 10 1 12 3 12 5 12 7 12 9 12 1 14 3 14 5 14 7 14 9 14 11 14
result:
ok ok
Test #6:
score: 0
Accepted
time: 13ms
memory: 5164kb
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: 24ms
memory: 5340kb
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: 24ms
memory: 5192kb
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: 20ms
memory: 5148kb
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: 17ms
memory: 5264kb
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