Submission #138844

# Submission time Handle Problem Language Result Execution time Memory
138844 2019-07-30T13:21:00 Z mirceaishere COCI17_cezar (COCI17_cezar) C++14
50 / 50
2 ms 380 KB
#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
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 128 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 380 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 380 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 380 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct