#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;
}
# |
결과 |
실행 시간 |
메모리 |
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 |
- |
# |
결과 |
실행 시간 |
메모리 |
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 |
- |
# |
결과 |
실행 시간 |
메모리 |
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 |
- |