Submission #141540

# Submission time Handle Problem Language Result Execution time Memory
141540 2019-08-08T10:46:05 Z radugheo COCI17_cezar (COCI17_cezar) C++14
50 / 50
3 ms 380 KB
#include <iostream>

using namespace std;

int n, i, x, mana, dif, nr1, nr2;
int f[12];

int main(){
    for (i=2; i<=11; i++){
        f[i] = 4;
    }
    f[10] = 16;
    cin >> n;
    for (i=1; i<=n; i++){
        cin >> x;
        if (x == 12 || x == 13 || x == 14){
            f[10]--;
        }
        else{
            f[x]--;
        }
        mana += x;
    }
    dif = 21 - mana;
    for (i=dif+1; i<=11; i++){
        nr1 += f[i];
    }
    nr2 = 52 - n - nr1;
    if (nr1 >= nr2){
        cout << "DOSTA";
    }
    else{
        cout << "VUCI";
    }
    return 0;
}
# 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 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
# 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 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
# 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 3 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 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 296 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 256 KB Output is correct