#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define endl '\n'
#ifdef LOCAL
#include "debug.h"
#else
#define debug(...) 37
#endif
template <typename T>
void print(vector<T> v) {
const int n = v.size();
for(int i = 1; i + 1 < n; ++i) {
cout << v[i];
}
cout << endl;
}
inline void solve(){
int n, m;
cin >> n >> m;
// vector<bool> v(n + 2, true);
// vector<int> sol;
// v[0] = v.back() = false;
// print(v);
// while(true) {
// int x;
// cin >> x;
// if(x == -1) {
// break;
// }
// v[x] = false;
// sol.push_back(x);
// vector<bool> nv = v;
// for(int i = 1; i <= n; ++i) {
// nv[i] = (v[i - 1] or v[i + 1]);
// }
// v = nv;
// print(v);
// }
// for(int x : sol) {
// cout << x << " ";
// }
if(n <= 2) {
cout << "Yes\n1\n1\n";
return;
}
cout << "Yes\n" << 2 * n - 4 << '\n';
for(int i = 2; i < n; ++i) {
cout << i << ' ';
}
for(int i = n - 1; i >= 2; --i) {
cout << i << ' ';
}
}
signed main(){
#ifdef LOCAL
freopen("test.in", "r", stdin);
freopen("err.txt", "w", stderr);
#endif
// ios_base::sync_with_stdio(0);
// cin.tie(NULL);
// signed t; cin >> t; while(t--)
solve();
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Token "Yes" doesn't correspond to pattern "YES|NO" |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Token "Yes" doesn't correspond to pattern "YES|NO" |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Token "Yes" doesn't correspond to pattern "YES|NO" |
2 |
Halted |
0 ms |
0 KB |
- |