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