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>
#include <fstream>
//#define endl '\n'
#define mod 1000000007
#define INF 9000000000000000
using namespace std;
const int Max = 1e4;
vector<int> v[Max];
int main()
{
ios_base::sync_with_stdio(0);cout.tie(0);cin.tie(0);
int n, m; cin >> n >> m;
for(int i = 0; i < m; i++) {
int a, b; cin >> a >> b;
v[a].push_back(b);
v[b].push_back(a);
}
if(m > n-1) {
cout << "NO" << endl;
}
else {
cout << "YES" << endl << '1' << endl << '1' << ' ';
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |