#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define S second
#define F first
#define pii pair<ll,ll>
#define vi vector<int>
#define vvi vector<vi>
#define vvvi vector<vvi>
#define vp vector<pii>
#define vvp vector<vp>
#define vb vector<bool>
#define vvb vector<vb>
#define INF 1000000000000000
#define MOD 1000000007
#define MAXN 100000
using namespace std;
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
vvi adj(MAXN+1);
signed main() {
int n,m;
cin>>n>>m;
for (int i=1;i<=m;i++) {
int u,v;
cin>>u>>v;
adj[u].pb(v);
adj[v].pb(u);
}
cout<<"YES\n";
cout<<2*n-4<<"\n";
for (int i=2;i<n;i++)cout<<i<<" ";
for (int i=n-1;i>=2;i--)cout<<i<<" ";
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
2652 KB |
Integer parameter [name=k] equals to -2, violates the range [1, 5] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
2652 KB |
Integer parameter [name=k] equals to -2, violates the range [1, 5] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
2652 KB |
Integer parameter [name=k] equals to -2, violates the range [1, 5] |
2 |
Halted |
0 ms |
0 KB |
- |