# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
533770 | FronPaw | Ronald (COCI17_ronald) | C++14 | 45 ms | 2244 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |