Submission #533770

#TimeUsernameProblemLanguageResultExecution timeMemory
533770FronPawRonald (COCI17_ronald)C++14
75 / 120
45 ms2244 KiB
#include <bits/stdc++.h> #define int long long using namespace std; map <int, int> fr; bool ok1 (int n) { bool good = true; int cate = n - 1; for (auto it:fr) if (it.second != cate) good = false; return good; } main () { ios_base::sync_with_stdio(false); cin.tie(NULL); int n, m; cin >> n >> m; for (int i = 1;i<=m;++i) { int a, b; cin >> a >> b; fr[a]++, fr[b]++; } if (ok1(n)) { cout << "DA"; return 0; } bool ok = 1; for (auto it:fr) { if (it.second % 2 == 0) ok = 0; } if (ok == 1) cout << "DA"; else cout << "NE"; return 0; }

Compilation message (stderr)

ronald.cpp:14:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   14 | main ()
      | ^~~~
#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...