Submission #85946

# Submission time Handle Problem Language Result Execution time Memory
85946 2018-11-23T08:22:49 Z memetkagan44 COCI17_cezar (COCI17_cezar) C++11
50 / 50
3 ms 760 KB
#include<bits/stdc++.h>
using namespace std;
int n,a,sum,cnt[15],x,y;
int main(){
    scanf("%d",&n);
    for(int i=2;i<=11;i++)
        cnt[i]=4;
    cnt[10]+=12;
    for(int i=1;i<=n;i++){
        scanf("%d",&a);
        cnt[a]--;
        sum+=a;
    }
    for(int i=2;i<=11;i++){
        if(i<=21-sum)
            x+=cnt[i];
        else
            y+=cnt[i];
    }
    printf("%s\n", x>y ? "VUCI" : "DOSTA");
    return 0;
}

Compilation message

cezar.cpp: In function 'int main()':
cezar.cpp:5:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
cezar.cpp:10:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d",&a);
         ~~~~~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 3 ms 484 KB Output is correct
3 Correct 2 ms 512 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 512 KB Output is correct
2 Correct 2 ms 512 KB Output is correct
3 Correct 2 ms 560 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 560 KB Output is correct
2 Correct 2 ms 708 KB Output is correct
3 Correct 2 ms 708 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 708 KB Output is correct
2 Correct 2 ms 708 KB Output is correct
3 Correct 2 ms 708 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 708 KB Output is correct
2 Correct 2 ms 708 KB Output is correct
3 Correct 2 ms 708 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 708 KB Output is correct
2 Correct 2 ms 708 KB Output is correct
3 Correct 2 ms 708 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 716 KB Output is correct
2 Correct 2 ms 740 KB Output is correct
3 Correct 2 ms 740 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 740 KB Output is correct
2 Correct 2 ms 760 KB Output is correct
3 Correct 2 ms 760 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 760 KB Output is correct
2 Correct 2 ms 760 KB Output is correct
3 Correct 2 ms 760 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 760 KB Output is correct
2 Correct 2 ms 760 KB Output is correct
3 Correct 2 ms 760 KB Output is correct