답안 #49502

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
49502 2018-05-30T00:35:13 Z lcs147 Cezar (COCI17_cezar) C++
50 / 50
3 ms 620 KB
#include<bits/stdc++.h>
using namespace std;
int cont[110];
int main(){
    int n;
    scanf("%d",&n);
    int soma=0;

    for(int i=2;i<=9;i++)cont[i]=4;
    cont[10]=4*4;
    cont[11]=4;
    while(n--){
        int a; scanf("%d",&a);
        soma+=a;
        cont[a]--;
    }
    int dif=21-soma;
    int maior=0,menor=0;
    for(int i=2;i<=11;i++){
        if(i>   dif) maior+=cont[i];
        else menor+=cont[i];
    }
    if(maior>=menor)printf("DOSTA\n");
    else printf("VUCI\n");
    return 0;
}

Compilation message

cezar.cpp: In function 'int main()':
cezar.cpp:6:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
cezar.cpp:13:21: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         int a; scanf("%d",&a);
                ~~~~~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 376 KB Output is correct
2 Correct 2 ms 480 KB Output is correct
3 Correct 2 ms 480 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 480 KB Output is correct
2 Correct 3 ms 480 KB Output is correct
3 Correct 3 ms 480 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 480 KB Output is correct
2 Correct 3 ms 496 KB Output is correct
3 Correct 3 ms 496 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 572 KB Output is correct
2 Correct 3 ms 572 KB Output is correct
3 Correct 3 ms 572 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 572 KB Output is correct
2 Correct 3 ms 572 KB Output is correct
3 Correct 2 ms 572 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 572 KB Output is correct
2 Correct 2 ms 572 KB Output is correct
3 Correct 3 ms 572 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 572 KB Output is correct
2 Correct 2 ms 572 KB Output is correct
3 Correct 2 ms 572 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 572 KB Output is correct
2 Correct 3 ms 572 KB Output is correct
3 Correct 2 ms 620 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 620 KB Output is correct
2 Correct 2 ms 620 KB Output is correct
3 Correct 3 ms 620 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 620 KB Output is correct
2 Correct 2 ms 620 KB Output is correct
3 Correct 2 ms 620 KB Output is correct