#include <bits/stdc++.h>
using namespace std;
#define pb push_back
const int N = 1e3 + 5;
//vector <int> v[N];
//bool vis[N];
//void dfs (int x, int pr) {
// vis[x] = 1;
// for (int i : v[x]) {
// if (i == pr) continue;
// if (vis[i]) {
// cout << "NO";
// exit(0);
// }
// dfs (i, x);
// }
// vis[x] = 2;
//}
int main () {
// freopen ("input.txt", "r", stdin);
int n, m;
cin >> n >> m;
for (int i = 1; i <= m; ++i) {
int l, r;
cin >> l >> r;
// v[l].pb (r);
// v[r].pb (l);
}
// dfs (1, -1);
// if (m == n - 1) cout << "YES\n";
// else {
// if (n < 20) cout << "NO\n";
// else cout << "YES\n";
// }
//
cout << "YES\n";
for (int i = 2; i < n; ++i) {
cout << i << " ";
}
for (int i = n - 1; i > 1; i--) {
cout << i << " ";
}
// cout << n * 4 - 4 << "\n";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |