Submission #1070269

# Submission time Handle Problem Language Result Execution time Memory
1070269 2024-08-22T12:39:45 Z RandomUser COCI17_cezar (COCI17_cezar) C++17
50 / 50
1 ms 604 KB
#include <bits/stdc++.h>
using namespace std;

int a[52], occ[12];

int main() {
    int n, sum = 0;
    cin >> n;

    for(int i=1; i<=9; i++) occ[i] = 4;
    occ[10] = 12;
    occ[11] = 4;

    for(int i=0; i<n; i++) {
        cin >> a[i];
        sum += a[i];
        occ[a[i]]--;
    }

    if(sum >= 21) {
        cout << "DOSTA\n";
        return 0;
    }

    int big = 0, small = 0;
    for(int i=1; i<=11; i++) {
        if(i >= 21 - sum) big += occ[i];
        else small += occ[i];
    }

    if(big >= small) {
        cout << "DOSTA\n";
    } else {
        cout << "VUCI\n";
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 604 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 420 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 428 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 408 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct