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, 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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |