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 n, sum, need, a, b;
map<int,int> create()
{
map<int,int> m;
m[1] = 4, m[2] = 4, m[3] = 4, m[4] = 4, m[5] = 4, m[6] = 4, m[7] = 4, m[8] = 4, m[9] = 4, m[10] = 16, m[11] = 4;
return m;
}
map<int, int> m = create();
int main(){
cin >> n;
for (int i = 0; i < n; i++)
{
int temp;
cin >> temp;
sum += temp;
m[temp]--;
}
need = 21 - sum;
for (int i = 1; i <= 11; i++)
{
if(i <= need){
a += m[i];
}
else{
b += m[i];
}
}
a > b ? cout << "VUCI" : cout << "DOSTA";
}
# | 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... |