This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |