Submission #329281

#TimeUsernameProblemLanguageResultExecution timeMemory
329281gustasonRonald (COCI17_ronald)C++14
15 / 120
39 ms2284 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; bool solve(vector<int> ind) { for(int i : ind) { if (i > 1) return false; } return true; } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n, m; cin >> n >> m; vector<int> ind(n+1, 0); for(int i = 0; i < m; i++) { int a, b; cin >> a >> b; ind[a]++; ind[b]++; } cout << (solve(ind) ? "DA" : "NE"); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...