QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#414455#8215. Isomorphic Delightucup-team1231#WA 1ms3820kbC++17850b2024-05-19 00:33:412024-05-19 00:33:41

Judging History

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

  • [2024-05-19 00:33:41]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3820kb
  • [2024-05-19 00:33:41]
  • 提交

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