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 n, x, i, f[16], suma, rest, bune, rele;
/// 52 de carti
/// cele de la 1 la 9 isi pastreaza valoarea
/// 4 carti (10, J, Q, K) valoreaza 10
/// asul valoreaza 11
int main(){
/// in f tinem numarul de carti de un fel care se afla in prezent
f[1]=4;
f[2]=4;
f[3]=4;
f[4]=4;
f[5]=4;
f[6]=4;
f[7]=4;
f[8]=4;
f[9]=4;
f[10]=16;
f[11]=4;
cin>>n;
for(i=1; i<=n; i++){
cin>>x;
suma+=x;
f[x]--;
}
rest=21-suma;
for(i=1; i<=11; i++){
if(i<=rest){
bune+=f[i];
}else{
rele+=f[i];
}
}
if(bune>=rele){
/// DRAW
cout<<"VUCI";
}else{
/// STOP
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... |