Submission #165702

#TimeUsernameProblemLanguageResultExecution timeMemory
165702SenseiCOCI17_cezar (COCI17_cezar)C++17
50 / 50
3 ms376 KiB
#include <bits/stdc++.h> using namespace std; const int MAXN = 1e5; int a[MAXN + 7]; int cnt[MAXN + 7]; int main () { int N; cin >> N; for (int i = 2; i <= 9; i++) { cnt[i] = 4; } cnt[10] = 16; cnt[11] = 4; int sum = 0; for (int i = 1; i <= N; i++) { int t; cin >> t; cnt[t]--; sum += t; } int rem = 21 - sum; int cnt0 = 0; for (int i = min(11, rem); i >= 1; i--) { cnt0 += cnt[i]; } int cnt1 = 0; for (int i = max(1, rem + 1); i <= 11; i++) { cnt1 += cnt[i]; } if (cnt1 >= cnt0) { cout << "DOSTA" << "\n"; } else { cout << "VUCI" << "\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...