제출 #865810

#제출 시각아이디문제언어결과실행 시간메모리
865810RifalNewspapers (CEOI21_newspapers)C++14
4 / 100
1 ms856 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...