QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#338076#8215. Isomorphic DelightSGColin#WA 0ms3804kbC++17896b2024-02-25 17:29:092024-02-25 17:29:09

Judging History

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

  • [2024-02-25 17:29:09]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3804kb
  • [2024-02-25 17:29:09]
  • 提交

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 <= 4) {puts("NO"); return 0;}
	if (n == 5) {
		int x = 1, t = 0;
		rep(i, 1, 1000000000) {
			++x; t += x; x /= t;
		}
		return 0;
	}
	puts("YES");
	printf("%d\n", n);
	puts("1 2");
	puts("2 3");
	puts("3 1");
	puts("3 4");
	puts("2 5");
	rep(i, 6, n) printf("%d %d\n", i - 1, i);
	return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3608kb

input:

1

output:

YES
0

result:

ok Everything ok

Test #2:

score: 0
Accepted
time: 0ms
memory: 3804kb

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: 3620kb

input:

4

output:

NO

result:

ok Everything ok

Test #4:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

2

output:

NO

result:

ok Everything ok

Test #5:

score: 0
Accepted
time: 0ms
memory: 3496kb

input:

3

output:

NO

result:

ok Everything ok

Test #6:

score: -100
Wrong Answer
time: 0ms
memory: 3672kb

input:

5

output:


result:

wrong output format Unexpected end of file - token expected