Submission #85946

#TimeUsernameProblemLanguageResultExecution timeMemory
85946memetkagan44COCI17_cezar (COCI17_cezar)C++11
50 / 50
3 ms760 KiB
#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 (stderr)

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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...