답안 #138294

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
138294 2019-07-29T17:04:49 Z AldeaDanut Cezar (COCI17_cezar) C++14
50 / 50
8 ms 396 KB
#include <iostream>
using namespace std;

int n,i,f[12],s,j,c1,c2;

int main(){
    cin>>n;
    for(i=2;i<=11;i++)
        f[i]=4;
    f[10]=16;

    for(i=1;i<=n;i++){
        cin>>j;
        if(j>=10){
            f[10]--;
            s+=10;
        }else{
            if(j==1){
                f[11]--;
                s+=11;
            }else{
                f[j]--;
                s+=j;
            }
        }
    }

    for(i=2;i+s<=21&&i<=11;i++)
        c1+=f[i];
    for(;i<=11;i++)
        c2+=f[i];

    //acout<<c1<<" "<<c2<<" ";
    if(c1>=c2)
        cout<<"VUCI";
    else
        cout<<"DOSTA";

    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 8 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 4 ms 396 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 252 KB Output is correct
# 결과 실행 시간 메모리 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