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;
//ifstream fin("davor.in");
//ofstream fout("davor.out");
int n,val[100],s1,s2,s,rest,x;
int main(){
for(int i=2;i<=11;i++){
val[i]=4;
}
val[10]*=4;
cin>>n;
for(int i=1;i<=n;i++){
cin>>x;
val[x]--;
s+=x;
}
rest=21-s;
for(int i=1;i<=rest;i++){
s1+=val[i];
}
for(int i=rest+1;i<=11;i++){
s2+=val[i];
}
if(s1>s2){
cout<<"VUCI";
}
else{
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... |