#include <bits/stdc++.h>
using namespace std;
#define LCBorz ios_base::sync_with_stdio(false); cin.tie(0);
#define int long long
#define all(x) x.begin(), x.end()
#define endl '\n'
const int N=200005;
const int INF=1e18;
vector<int> adj[N],vis(N),a[N];
void dfs(int k,int pa){
vis[k]=1;
for(int j:adj[k]){
if(j==pa)continue;
dfs(j,k);
}
}
int32_t main() {
LCBorz;
int n,m;cin>>n>>m;
if(m>=n){
cout<<"NO"<<endl;
return 0;
}
cout<<"YES"<<endl;
if(n==1){
cout<<"1\n1\n";
return 0;
}
if(n==2){
cout<<"2\n1 1\n";
return 0;
}
cout<<n*2-4<<endl;
for(int i=2;i<n;i++){
cout<<i<<' ';
}
for(int i=n-1;i>1;i--){
cout<<i<<' ';
}
cout<<endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
11356 KB |
Output is correct |
2 |
Correct |
5 ms |
11356 KB |
Output is correct |
3 |
Correct |
5 ms |
11356 KB |
Output is correct |
4 |
Correct |
5 ms |
11356 KB |
Output is correct |
5 |
Partially correct |
5 ms |
11356 KB |
Failed to provide a successful strategy. |
6 |
Partially correct |
5 ms |
11356 KB |
Failed to provide a successful strategy. |
7 |
Correct |
5 ms |
11356 KB |
Output is correct |
8 |
Partially correct |
6 ms |
11356 KB |
Failed to provide a successful strategy. |
9 |
Incorrect |
5 ms |
11356 KB |
Output isn't correct |
10 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
11356 KB |
Output is correct |
2 |
Correct |
5 ms |
11356 KB |
Output is correct |
3 |
Correct |
5 ms |
11356 KB |
Output is correct |
4 |
Correct |
5 ms |
11356 KB |
Output is correct |
5 |
Correct |
5 ms |
11356 KB |
Output is correct |
6 |
Correct |
5 ms |
11364 KB |
Output is correct |
7 |
Correct |
5 ms |
11356 KB |
Output is correct |
8 |
Correct |
5 ms |
11360 KB |
Output is correct |
9 |
Correct |
5 ms |
11360 KB |
Output is correct |
10 |
Correct |
5 ms |
11356 KB |
Output is correct |
11 |
Correct |
5 ms |
11440 KB |
Output is correct |
12 |
Correct |
6 ms |
11356 KB |
Output is correct |
13 |
Correct |
5 ms |
11356 KB |
Output is correct |
14 |
Correct |
5 ms |
11356 KB |
Output is correct |
15 |
Correct |
5 ms |
11356 KB |
Output is correct |
16 |
Correct |
5 ms |
11356 KB |
Output is correct |
17 |
Correct |
6 ms |
11356 KB |
Output is correct |
18 |
Correct |
5 ms |
11352 KB |
Output is correct |
19 |
Correct |
6 ms |
11356 KB |
Output is correct |
20 |
Correct |
7 ms |
11352 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
11356 KB |
Output is correct |
2 |
Correct |
5 ms |
11356 KB |
Output is correct |
3 |
Correct |
5 ms |
11356 KB |
Output is correct |
4 |
Correct |
5 ms |
11356 KB |
Output is correct |
5 |
Partially correct |
5 ms |
11356 KB |
Failed to provide a successful strategy. |
6 |
Partially correct |
5 ms |
11356 KB |
Failed to provide a successful strategy. |
7 |
Correct |
5 ms |
11356 KB |
Output is correct |
8 |
Partially correct |
6 ms |
11356 KB |
Failed to provide a successful strategy. |
9 |
Incorrect |
5 ms |
11356 KB |
Output isn't correct |
10 |
Halted |
0 ms |
0 KB |
- |