QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#414455 | #8215. Isomorphic Delight | ucup-team1231# | WA | 1ms | 3820kb | C++17 | 850b | 2024-05-19 00:33:41 | 2024-05-19 00:33:41 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
if (n == 1) {
printf("YES\n0\n");
return 0;
}
else if (n <= 5) {
printf("NO\n");
return 0;
}
else if (n == 6) {
printf("YES\n");
printf("%d\n",n);
printf("1 2\n");
printf("2 3\n");
printf("3 1\n");
printf("2 4\n");
int i,u = 3;
for (i = 5; i <= n; i++) {
printf("%d %d\n",u,i);
u = i;
}
}
else {
printf("YES\n");
printf("%d\n",n-1);
printf("1 3\n");
printf("2 4\n");
printf("2 3\n");
int i,u = 3;
for (i = 5; i <= n; i++) {
printf("%d %d\n",u,i);
u = i;
}
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3604kb
input:
1
output:
YES 0
result:
ok Everything ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 3780kb
input:
6
output:
YES 6 1 2 2 3 3 1 2 4 3 5 5 6
result:
ok Everything ok
Test #3:
score: 0
Accepted
time: 1ms
memory: 3644kb
input:
4
output:
NO
result:
ok Everything ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
2
output:
NO
result:
ok Everything ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
3
output:
NO
result:
ok Everything ok
Test #6:
score: 0
Accepted
time: 0ms
memory: 3708kb
input:
5
output:
NO
result:
ok Everything ok
Test #7:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
7
output:
YES 6 1 3 2 4 2 3 3 5 5 6 6 7
result:
ok Everything ok
Test #8:
score: -100
Wrong Answer
time: 0ms
memory: 3716kb
input:
8
output:
YES 7 1 3 2 4 2 3 3 5 5 6 6 7 7 8
result:
wrong answer contestant's solution is worse (more edges) than jury's