QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#338076 | #8215. Isomorphic Delight | SGColin# | WA | 0ms | 3804kb | C++17 | 896b | 2024-02-25 17:29:09 | 2024-02-25 17:29:09 |
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 <= 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;
}
Details
Tip: Click on the bar to expand more detailed information
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