Submission #107983

#TimeUsernameProblemLanguageResultExecution timeMemory
107983FrankenweenCOCI17_cezar (COCI17_cezar)C++17
50 / 50
3 ms512 KiB
#ifdef LOCAL #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> #define ull unsigned long long #define pll pair<ll, ll> #define mp make_pair #define ll long long #define pb push_back #define deb(x) cout << #x << " = " << x << endl #define all(x) x.begin(), x.end() #define ld long double const ll mod = (ll)998244353; const ll BASE = 47; const ll inf = (ll)1e18; const long double e = 2.718281828459; const long double pi = 3.141592653; const ld EPS = 1e-9; using namespace std; template <class T> istream& operator>>(istream &in, vector<T> &arr) { for (T &cnt : arr) { in >> cnt; } return in; }; void solve() { ll n; cin >> n; vector<ll> have(14, 4); have[0] = 0; have[1] = 0; ll val = 0; for (int i = 0; i < n; i++) { ll x; cin >> x; val += x; have[x]--; } ll delta = 21 - val; ll have_lesser = 0, have_bigger = 0; for (int i = 2; i < 14; i++) { if (i <= delta) { have_lesser += have[i]; } else { have_bigger += have[i]; } } if (have_bigger >= have_lesser) { cout << "DOSTA"; } else { cout << "VUCI"; } } int main() { #ifndef LOCAL ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #else freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif cout.precision(30); ll seed = time(0); //cerr << "Seed: " << seed << "\n"; srand(seed); solve(); 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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...