Submission #68399

# Submission time Handle Problem Language Result Execution time Memory
68399 2018-08-17T05:18:26 Z silxikys COCI17_cezar (COCI17_cezar) C++14
50 / 50
3 ms 832 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int cnt[12];

int main()
{
    ios_base::sync_with_stdio(false); cin.tie(NULL);
    for (int i = 2; i <= 10; i++) {
        cnt[i] = 4;
    }
    cnt[11] = 4;
    cnt[10] += 12;
    int n; cin >> n;
    int sum = 0;
    for (int i = 0; i < n; i++) {
        int ai; cin >> ai;
        cnt[ai]--;
        sum += ai;
    }

    int X = 21 - sum;
    int numLeq = 0, numGreater = 0;
    for (int i = 2; i <= 11; i++) {
        if (i <= X) numLeq += cnt[i];
        else numGreater += cnt[i];
    }

    cout << (numGreater >= numLeq ? "DOSTA" : "VUCI") << '\n';



    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 2 ms 364 KB Output is correct
3 Correct 2 ms 600 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 600 KB Output is correct
2 Correct 3 ms 676 KB Output is correct
3 Correct 2 ms 676 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 716 KB Output is correct
2 Correct 2 ms 716 KB Output is correct
3 Correct 2 ms 716 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 828 KB Output is correct
2 Correct 2 ms 828 KB Output is correct
3 Correct 2 ms 828 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 828 KB Output is correct
2 Correct 2 ms 828 KB Output is correct
3 Correct 3 ms 828 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 828 KB Output is correct
2 Correct 2 ms 828 KB Output is correct
3 Correct 2 ms 828 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 828 KB Output is correct
2 Correct 2 ms 828 KB Output is correct
3 Correct 2 ms 828 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 828 KB Output is correct
2 Correct 3 ms 828 KB Output is correct
3 Correct 2 ms 828 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 828 KB Output is correct
2 Correct 2 ms 828 KB Output is correct
3 Correct 3 ms 828 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 828 KB Output is correct
2 Correct 2 ms 828 KB Output is correct
3 Correct 2 ms 832 KB Output is correct