This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
int main() {
int N;
std::cin >> N;
std::cout << "YES" << std::endl;
if (N == 1) {
std::cout << 1 << '\n' << 1 << std::endl;
} else if (N <= 3) {
std::cout << 2 << '\n' << 2 << ' ' << 2 << std::endl;
} else {
std::cout << 2 + (N - 3) * 3 + 1 << std::endl;
std::cout << 2 << ' ' << 2 << ' ';
for (int i = 3; i <= N - 1; ++i) {
std::cout << i + 1 << ' ' << i - 1 << ' ' << i << ' ';
}
std::cout << N - 1 << std::endl;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |