Submission #144710

# Submission time Handle Problem Language Result Execution time Memory
144710 2019-08-17T14:33:11 Z alexandra_udristoiu COCI17_cezar (COCI17_cezar) C++14
50 / 50
3 ms 504 KB
#include<iostream>
using namespace std;
int n, i, x, sum, nr1, nr2;
int ff[14];
int main(){
    cin>> n;
    for(i = 1; i <= n; i++){
        cin>> x;
        sum += x;
    }
    sum = 21 - sum;
    for(i = 2; i <= 11; i++){
        ff[i] = 4;
    }
    ff[10] += 12;
    for(i = 2; i <= sum; i++){
        nr1 += ff[i];
    }
    for(i = sum + 1; i <= 11; i++){
        nr2 += ff[i];
    }
    if(nr1 > nr2){
        cout<<"VUCI";
    }
    else{
        cout<<"DOSTA";
    }
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 504 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 396 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 296 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 392 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 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 380 KB Output is correct
2 Correct 3 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 256 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 396 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 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 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 3 ms 256 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 256 KB Output is correct