QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#320032 | #8215. Isomorphic Delight | ucup-team2303# | WA | 0ms | 3864kb | C++11 | 996b | 2024-02-03 13:23:21 | 2024-02-03 13:23:23 |
Judging History
answer
/*
60 + 0 + 100 + 64 = 224.
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define L(i, j, k) for (int i = (j); i <= (k); i++)
#define R(i, j, k) for (int i = (j); i >= (k); i--)
#define pb push_back
#define pii pair<int, int>
inline int read()
{
int sum = 0, nega = 1;
char ch = getchar();
while (ch > '9'||ch < '0')
{
if (ch == '-') nega = -1;
ch = getchar();
}
while (ch <= '9' && ch >= '0') sum = sum * 10 + ch - '0', ch = getchar();
return sum * nega;
}
const int N = 1, mod = 998244353;
inline void add(int &x, int y) {x = (x + y) % mod;}
inline void del(int &x, int y) {x = (x - y + mod) % mod;}
int n;
signed main()
{
n = read();
if(n == 1) {puts("YES"); puts("0"); return 0;}
else if(n <= 5) {puts("NO"); return 0;}
else
{
puts("YES");
printf("%lld\n", n);
puts("1 2"); puts("2 3"); puts("1 3");
puts("2 4"); puts("3 5");
L(i, 6, n) printf("%lld %lld\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: 3656kb
input:
1
output:
YES 0
result:
ok Everything ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 3832kb
input:
6
output:
YES 6 1 2 2 3 1 3 2 4 3 5 5 6
result:
ok Everything ok
Test #3:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
4
output:
NO
result:
ok Everything ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
2
output:
NO
result:
ok Everything ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
3
output:
NO
result:
ok Everything ok
Test #6:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
5
output:
NO
result:
ok Everything ok
Test #7:
score: -100
Wrong Answer
time: 0ms
memory: 3864kb
input:
7
output:
YES 7 1 2 2 3 1 3 2 4 3 5 5 6 6 7
result:
wrong answer contestant's solution is worse (more edges) than jury's