Submission #139446

# Submission time Handle Problem Language Result Execution time Memory
139446 2019-07-31T18:06:52 Z RaresRosca COCI17_cezar (COCI17_cezar) C++14
50 / 50
3 ms 400 KB
#include <iostream>
using namespace std;
int i,x,sum,n,f[20],X,sol1,sol2;
int main(){
    cin>>n;
    for(i=2;i<=11;i++)
        f[i]=4;
    f[10]*=4;
    for(i=1;i<=n;i++){
        cin>>x;
        sum+=x;
        f[x]--;
    }
    X=21-sum;
    for(i=X+1;i<=11;i++)
        sol1+=f[i];

    for(i=2;i<=X;i++)
        sol2+=f[i];
    if(sol1>=sol2)
        cout<<"DOSTA";
    else
        cout<<"VUCI";
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 396 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 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 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 248 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 380 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 356 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 376 KB Output is correct
3 Correct 2 ms 400 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 292 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 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 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct