Submission #145042

# Submission time Handle Problem Language Result Execution time Memory
145042 2019-08-18T13:31:15 Z bogdan_buzatu COCI17_cezar (COCI17_cezar) C++14
50 / 50
11 ms 376 KB
#include <iostream>
using namespace std;
//ifstream fin("davor.in");
//ofstream fout("davor.out");
int n,val[100],s1,s2,s,rest,x;
int main(){

    for(int i=2;i<=11;i++){
        val[i]=4;
    }
    val[10]*=4;
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>x;
        val[x]--;
        s+=x;
    }
    rest=21-s;
    for(int i=1;i<=rest;i++){
        s1+=val[i];
    }
    for(int i=rest+1;i<=11;i++){
        s2+=val[i];
    }
    if(s1>s2){
        cout<<"VUCI";
    }
    else{
        cout<<"DOSTA";
    }


}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 11 ms 376 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 376 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 376 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 252 KB Output is correct
2 Correct 2 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 376 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 376 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 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 252 KB Output is correct
3 Correct 2 ms 376 KB Output is correct