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 dd[15];
int main() {
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
//freopen("output.txt", "w", stdout);
int n; cin >> n;
int sum=0;
for(int i=2 ; i<=9 ; ++i) dd[i]=4;
dd[10]=16; dd[11]=4;
for(int i=1 ; i<=n ; ++i) {
int a; cin >> a;
--dd[a];
sum += a;
}
sum = abs(sum - 21);
int num1=0;
for(int i=sum+1 ;i<=11 ; ++i) {
num1 += dd[i];
}
int num2=0;
for(int i=2 ; i<=sum ; ++i) num2 += dd[i];
cout << (num1 >= num2 ? "DOSTA" : "VUCI");
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... |