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;
les = 0;
gre = 0;
for (int j = 2; j < x; j ++) {
les += j*deck[j];
}
for (int j = x; j <= 11; j ++) {
gre += j*deck[j];
}
if (les < gre || x < 0) {
cout << "DOSTA";
return 0;
}
}
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... |