QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#338080#8215. Isomorphic DelightSGColin#WA 1ms3828kbC++17805b2024-02-25 17:33:032024-02-25 17:33:04

Judging History

你现在查看的是最新测评结果

  • [2024-02-25 17:33:04]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3828kb
  • [2024-02-25 17:33:03]
  • 提交

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