Submission #44278

#TimeUsernameProblemLanguageResultExecution timeMemory
44278JustInCaseCOCI17_cezar (COCI17_cezar)C++17
50 / 50
3 ms740 KiB
#include <bits/stdc++.h> #define endl '\n' using namespace std; int GetValue(int a) { if(a >= 2 && a <= 9) { return a; } } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int cnt[] = { 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 16, 4 }; int n; cin >> n; int sum = 0; for(int i = 0; i < n; i++) { int a; cin >> a; cnt[a]--; sum += a; } int cntPossible = 0, cntImpossible = 0; for(int i = 0; i <= 11; i++) { if(sum + i <= 21) { cntPossible += cnt[i]; } else { cntImpossible += cnt[i]; } } cout << (cntPossible >= cntImpossible ? "VUCI" : "DOSTA") << endl; return 0; }

Compilation message (stderr)

cezar.cpp: In function 'int GetValue(int)':
cezar.cpp:9:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#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...