Submission #234382

#TimeUsernameProblemLanguageResultExecution timeMemory
234382VEGAnnCOCI17_cezar (COCI17_cezar)C++14
50 / 50
5 ms384 KiB
#include <bits/stdc++.h> using namespace std; const int N = 20; int ost, sum, n, cnt[N], big, sml; void check(int vl, int kl){ kl -= cnt[vl]; if (vl <= ost) sml += kl; if (vl > ost) big += kl; } int main(){ ios_base::sync_with_stdio(0); cin.tie(0); #ifdef _LOCAL freopen("in.txt","r",stdin); #endif // _LOCAL cin >> n; for (int i = 0; i < n; i++){ int x; cin >> x; cnt[x]++; sum += x; } ost = 21 - sum; for (int i = 2; i < 10; i++) check(i, 4); check(10, 16); check(11, 4); cout << (big >= sml ? "DOSTA" : "VUCI");; 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...