Submission #1114599

#TimeUsernameProblemLanguageResultExecution timeMemory
1114599vjudge1Newspapers (CEOI21_newspapers)C++17
4 / 100
2 ms508 KiB
//Dost SEFEROĞLU #include <bits/stdc++.h> #pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt") using namespace std; #define int long long #define pii pair<int,int> #define ff first #define ss second #define sp << " " << #define all(cont) cont.begin(),cont.end() #define vi vector<int> const int MOD = 1e9+7,inf = 2e18; const int N = 2e5+50,Q = 2e5+50; const int B = 500; void solve() { int n,m; cin >> n >> m; if (m > n-1) { cout << "NO\n"; return; } vi deg(n+1,0); for (int i=1;i<=m;i++) { int a,b; cin >> a >> b; deg[a]++,deg[b]++; } cout << "YES\n"; cout << 1 << '\n'; cout << 1 << '\n'; } signed main() { ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #ifdef Dodi freopen("in.txt","r",stdin); freopen("out.txt","w",stdout); #endif int t = 1; //cin >> t; while (t --> 0) solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...