QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#338073 | #8215. Isomorphic Delight | SGColin# | WA | 0ms | 3844kb | C++17 | 785b | 2024-02-25 17:27:33 | 2024-02-25 17:27:34 |
Judging History
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);
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;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3736kb
input:
1
output:
YES 0
result:
ok Everything ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 3844kb
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: 3584kb
input:
4
output:
NO
result:
ok Everything ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
2
output:
NO
result:
ok Everything ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
3
output:
NO
result:
ok Everything ok
Test #6:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
5
output:
NO
result:
ok Everything ok
Test #7:
score: -100
Wrong Answer
time: 0ms
memory: 3844kb
input:
7
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