Submission #685007

#TimeUsernameProblemLanguageResultExecution timeMemory
685007moonheroNewspapers (CEOI21_newspapers)C++14
0 / 100
0 ms212 KiB
#include<bits/stdc++.h> using namespace std; using ll = long long; signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, m; cin >> n >> m; for (int i = 1; i <= m; i++) { int u, v; cin >> u >> v; } if (n == 1 || n == 2 || n == 3) { cout << "YES\n"; if (n == 1) cout << 1 << '\n' << 1 << '\n'; if (n == 2) cout << 2 << '\n' << 1 << ' ' << 1 << '\n'; if (n == 3) cout << 2 << '\n' << 2 << ' ' << 2 << '\n'; return 0; } cout << "NO\n"; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...