Submission #698781

#TimeUsernameProblemLanguageResultExecution timeMemory
698781CyanmondNewspapers (CEOI21_newspapers)C++17
6 / 100
1 ms332 KiB
#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::vector<int> answer; for (int i = 1; i <= N; ++i) { answer.push_back(i); } if (N != N / 2 * 2) { answer.push_back(N); } for (int i = N / 2 * 2; i >= 1; --i) { answer.push_back(i); } std::cout << answer.size() << std::endl; for (auto &e : answer) { std::cout << e << ' '; } std::cout << std::endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...