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<iostream>
using namespace std;
int a,x,les,gre,n,sum;
int deck[12] = {0,0,4,4,4,4,4,4,4,4,12,4};
int main (void) {
cin >> n;
for (int i = 1; i <= n; i ++) {
cin >> a;
deck[a] --;
sum += a;
}
x = 21-sum;
for (int i = 2; i < x; i ++) {
les += i*deck[i];
}
for (int i = x; i <= 11; i ++) {
gre += i*deck[i];
}
if (les < gre) {
cout << "DOSTA";
}
else {
cout << "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... |