#include <bits/stdc++.h>
using namespace std;
int n,m;
vector<int> muchii[1005];
bool adj[1005][1005];
int main()
{
cin>>n>>m;
for(int i=1;i<=m;i++)
{
int a,b;
cin>>a>>b;
muchii[a].push_back(b);
muchii[b].push_back(a);
}
if(m==n-1)
{
cout<<"YES\n";
vector<int> sol;
for(int i=2;i<=n;i+=2)
{
sol.push_back(i);
sol.push_back(i);
}
cout<<sol.size()<<'\n';
for(int i:sol)
cout<<i<<' ';
return 0;
}
else
cout<<"NO\n";
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Integer parameter [name=k] equals to 0, violates the range [1, 5] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Integer parameter [name=k] equals to 0, violates the range [1, 5] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Integer parameter [name=k] equals to 0, violates the range [1, 5] |
2 |
Halted |
0 ms |
0 KB |
- |