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>
using namespace std;
int a[52], occ[12];
int main() {
int n, sum = 0;
cin >> n;
for(int i=1; i<=9; i++) occ[i] = 4;
occ[10] = 12;
occ[11] = 4;
for(int i=0; i<n; i++) {
cin >> a[i];
sum += a[i];
occ[a[i]]--;
}
if(sum >= 21) {
cout << "DOSTA\n";
return 0;
}
int big = 0, small = 0;
for(int i=1; i<=11; i++) {
if(i >= 21 - sum) big += occ[i];
else small += occ[i];
}
if(big >= small) {
cout << "DOSTA\n";
} else {
cout << "VUCI\n";
}
return 0;
}
# | 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... |