Submission #222869

# Submission time Handle Problem Language Result Execution time Memory
222869 2020-04-14T09:37:03 Z ngot23 COCI17_cezar (COCI17_cezar) C++11
30 / 50
5 ms 384 KB
#include <bits/stdc++.h>

using namespace std;


int dd[15];
int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    //freopen("output.txt", "w", stdout);
    int n; cin >> n;
    int sum=0;
    for(int i=2 ; i<=9 ; ++i) dd[i]=4;
    dd[10]=16; dd[11]=4;
    for(int i=1 ; i<=n ; ++i) {
        int a; cin >> a;
        --dd[a];
        sum += a;
    }
    sum = abs(sum - 21);
    int num1=0;
    for(int i=sum+1 ;i<=11 ; ++i) {
        num1 += dd[i];
    }

    int num2=0;
    for(int i=3 ; i<sum ; ++i) num2 += dd[i];
    cout << (num1 >= num2 ? "DOSTA" : "VUCI");
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Incorrect 5 ms 384 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 4 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Incorrect 5 ms 384 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Incorrect 5 ms 288 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 4 ms 384 KB Output is correct