Submission #237189

#TimeUsernameProblemLanguageResultExecution timeMemory
237189MlxaCOCI17_cezar (COCI17_cezar)C++14
50 / 50
5 ms512 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; #define int ll #define all(x) x.begin(), x.end() #define x first #define y second #define mp make_pair #define mt make_tuple const int N = 20; int cnt[N]; int n; int x; int s; signed main() { #ifdef LC assert(freopen("input.txt", "r", stdin)); #endif ios::sync_with_stdio(0); cin.tie(0); fill(cnt + 2, cnt + 10, 4); cnt[10] = 16; cnt[11] = 4; cin >> n; while (n--) { cin >> x; --cnt[x]; assert(cnt[x] >= 0); s += x; } int a = 0; int b = 0; x = 21 - s; assert(x >= 0); for (int i = 2; i <= x; ++i) { a += cnt[i]; } for (int i = x + 1; i <= 11; ++i) { b += cnt[i]; } if (a >= b) { cout << "VUCI\n"; } else { cout << "DOSTA\n"; } 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...