Submission #698780

# Submission time Handle Problem Language Result Execution time Memory
698780 2023-02-14T09:45:40 Z Cyanmond Newspapers (CEOI21_newspapers) C++17
0 / 100
1 ms 212 KB
#include <bits/stdc++.h>

int main() {
    int N, M;
    std::cin >> N >> M;
    std::vector<int> A(M), B(M);
    std::vector<int> deg(N);
    for (int i = 0; i < M; ++i) {
        std::cin >> A[i] >> B[i];
        --A[i], --B[i];
        ++deg[A[i]];
        ++deg[B[i]];
    }
    
    std::cout << "YES" << std::endl;
    std::cout << N + (N / 2) + (N == N / 2 * 2 ? 0 : 1) << std::endl;
    for (int i = 1; i <= N; ++i) {
        std::cout << i << ' ';
    }
    if (N != N / 2 * 2) {
        std::cout << N << ' ';
    }
    for (int i = N / 2 * 2; i >= 1; --i) {
        std::cout << i << ' ';
    }
    std::cout << std::endl;
}
# Verdict Execution time Memory Grader output
1 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
2 Incorrect 1 ms 212 KB Extra information in the output file
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 212 KB Provide a successful but not optimal strategy.
2 Incorrect 0 ms 212 KB Extra information in the output file
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
2 Incorrect 1 ms 212 KB Extra information in the output file
3 Halted 0 ms 0 KB -