#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;
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 |
Correct |
1 ms |
212 KB |
Output is correct |
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 |
Correct |
0 ms |
212 KB |
Output is correct |
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 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
Extra information in the output file |
3 |
Halted |
0 ms |
0 KB |
- |