# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
783339 | 2023-07-14T21:09:34 Z | vh50 | Newspapers (CEOI21_newspapers) | C++17 | 0 ms | 340 KB |
#include <bits/stdc++.h> #define int long long #define endl "\n" using namespace std; const int MAXN = 2e3; int n, m, marc[MAXN][MAXN]; vector <int> g[MAXN]; void dfs(int a, int r) { marc[a][r] = 1; for(auto v : g[a]) { if(marc[v][r]) continue; dfs(v, r); } } main() { cin >> n >> m; for(int i = 0; i < m; i++) { int a, b; cin >> a >> b; a--, b--; g[a].push_back(b); g[b].push_back(a); } if(m == n - 1) cout << "YES" << endl; else cout << "NO" << endl; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 340 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 340 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 340 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |