QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#338080 | #8215. Isomorphic Delight | SGColin# | WA | 1ms | 3828kb | C++17 | 805b | 2024-02-25 17:33:03 | 2024-02-25 17:33:04 |
Judging History
answer
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define pb push_back
#define eb emplace_back
#define all(s) (s).begin(), (s).end()
#define rep(i, a, b) for (int i = (a); i <= (b); ++i)
#define per(i, a, b) for (int i = (a); i >= (b); --i)
inline int rd() {
int x = 0;
bool f = 0;
char c = getchar();
for (; !isdigit(c); c = getchar()) f |= (c == '-');
for (; isdigit(c); c = getchar()) x = x * 10 + (c ^ 48);
return f ? -x : x;
}
int main() {
int n = rd();
if (n == 1) {puts("YES\n0"); return 0;}
if (n <= 5) {puts("NO"); return 0;}
puts("YES");
printf("%d\n", n - (n > 6));
puts("1 2");
puts("2 3");
puts("3 1");
puts("3 4");
puts("2 5");
rep(i, 6, n - (n > 6)) printf("%d %d\n", i - 1, i);
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3540kb
input:
1
output:
YES 0
result:
ok Everything ok
Test #2:
score: 0
Accepted
time: 1ms
memory: 3740kb
input:
6
output:
YES 6 1 2 2 3 3 1 3 4 2 5 5 6
result:
ok Everything ok
Test #3:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
4
output:
NO
result:
ok Everything ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
2
output:
NO
result:
ok Everything ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
3
output:
NO
result:
ok Everything ok
Test #6:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
5
output:
NO
result:
ok Everything ok
Test #7:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
7
output:
YES 6 1 2 2 3 3 1 3 4 2 5 5 6
result:
ok Everything ok
Test #8:
score: -100
Wrong Answer
time: 0ms
memory: 3800kb
input:
8
output:
YES 7 1 2 2 3 3 1 3 4 2 5 5 6 6 7
result:
wrong answer contestant's solution is worse (more edges) than jury's