Submission #49502

# Submission time Handle Problem Language Result Execution time Memory
49502 2018-05-30T00:35:13 Z lcs147 COCI17_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);
                ~~~~~^~~~~~~~~
# Verdict Execution time Memory 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
# Verdict Execution time Memory 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
# Verdict Execution time Memory 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
# Verdict Execution time Memory 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
# Verdict Execution time Memory 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
# Verdict Execution time Memory 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
# Verdict Execution time Memory 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
# Verdict Execution time Memory 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
# Verdict Execution time Memory 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
# Verdict Execution time Memory 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