제출 #698707

#제출 시각아이디문제언어결과실행 시간메모리
698707CyanmondNewspapers (CEOI21_newspapers)C++17
4 / 100
1 ms304 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...