QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#368794 | #8215. Isomorphic Delight | ucup-team3215# | WA | 1ms | 3704kb | C++20 | 451b | 2024-03-27 16:31:09 | 2024-03-27 16:31:26 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0)->sync_with_stdio(0);
int n; cin >> n;
if (n > 1 && n < 6) return cout << "NO", 0;
cout << "YES\n";
if (n == 6) {
cout << "6\n1 2\n2 3\n1 3\n3 4\n2 5\n5 6\n";
return 0;
}
cout << n - 1 - (n > 7) << '\n';
if (n == 1) return 0;
cout << "1 2\n1 3\n3 4\n1 5\n";
for (int i = 6; i <= n - (n > 7); ++i) cout << i << ' ' << i - 1 << '\n';
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3604kb
input:
1
output:
YES 0
result:
ok Everything ok
Test #2:
score: 0
Accepted
time: 1ms
memory: 3660kb
input:
6
output:
YES 6 1 2 2 3 1 3 3 4 2 5 5 6
result:
ok Everything ok
Test #3:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
4
output:
NO
result:
ok Everything ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
2
output:
NO
result:
ok Everything ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
3
output:
NO
result:
ok Everything ok
Test #6:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
5
output:
NO
result:
ok Everything ok
Test #7:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
7
output:
YES 6 1 2 1 3 3 4 1 5 6 5 7 6
result:
ok Everything ok
Test #8:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
8
output:
YES 6 1 2 1 3 3 4 1 5 6 5 7 6
result:
ok Everything ok
Test #9:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
9
output:
YES 7 1 2 1 3 3 4 1 5 6 5 7 6 8 7
result:
ok Everything ok
Test #10:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
10
output:
YES 8 1 2 1 3 3 4 1 5 6 5 7 6 8 7 9 8
result:
ok Everything ok
Test #11:
score: 0
Accepted
time: 1ms
memory: 3704kb
input:
11
output:
YES 9 1 2 1 3 3 4 1 5 6 5 7 6 8 7 9 8 10 9
result:
ok Everything ok
Test #12:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
12
output:
YES 10 1 2 1 3 3 4 1 5 6 5 7 6 8 7 9 8 10 9 11 10
result:
ok Everything ok
Test #13:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
13
output:
YES 11 1 2 1 3 3 4 1 5 6 5 7 6 8 7 9 8 10 9 11 10 12 11
result:
ok Everything ok
Test #14:
score: 0
Accepted
time: 1ms
memory: 3628kb
input:
14
output:
YES 12 1 2 1 3 3 4 1 5 6 5 7 6 8 7 9 8 10 9 11 10 12 11 13 12
result:
ok Everything ok
Test #15:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
15
output:
YES 13 1 2 1 3 3 4 1 5 6 5 7 6 8 7 9 8 10 9 11 10 12 11 13 12 14 13
result:
ok Everything ok
Test #16:
score: -100
Wrong Answer
time: 0ms
memory: 3648kb
input:
16
output:
YES 14 1 2 1 3 3 4 1 5 6 5 7 6 8 7 9 8 10 9 11 10 12 11 13 12 14 13 15 14
result:
wrong answer contestant's solution is worse (more edges) than jury's