답안 #319603

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
319603 2020-11-05T19:04:08 Z gustason Cezar (COCI17_cezar) C++14
50 / 50
1 ms 512 KB
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    vector<int> cnt(15, 0);
    for(int i = 2; i <= 9; i++) {
        cnt[i] = 4;
    }
    cnt[10] = 4 * 4;
    cnt[11] = 4;

    int N, sum = 0;
    cin >> N;
    while(N--) {
        int card;
        cin >> card;
        cnt[card]--;
        sum += card;
    }

    int diff = 21 - sum, greater = 0, less = 0;
    for(int i = 2; i <= 11; i++) {
        if (i > diff) {
            greater += cnt[i];
        } else {
            less += cnt[i];
        }
    }

    if (greater >= less) {
        cout << "DOSTA\n";
    } else {
        cout << "VUCI\n";
    }
    return 0;
}
//~ check for overflows
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 0 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 492 KB Output is correct
2 Correct 1 ms 512 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 396 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 364 KB Output is correct
2 Correct 0 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 488 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct