Submission #141073

#TimeUsernameProblemLanguageResultExecution timeMemory
14107344442COCI17_cezar (COCI17_cezar)C++11
50 / 50
3 ms380 KiB
#include <bits/stdc++.h> using namespace std; int n,a[55],b,ok,c; int main (){ ios::sync_with_stdio(0); scanf("%d",&n); for(int i=0;i<n;i++){ scanf("\n%d",&a[i]); b=b+a[i]; } ok=21-b; if(ok<10) c=(ok-1)*4; else if(ok==11) c=52; else c=48; for(int i=0;i<n;i++){ if(a[i]<=ok) c--; } if(c<(52-n)/2) printf("DOSTA"); else printf("VUCI"); return 0; }

Compilation message (stderr)

cezar.cpp: In function 'int main()':
cezar.cpp:6:12: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
       scanf("%d",&n);
       ~~~~~^~~~~~~~~
cezar.cpp:8:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("\n%d",&a[i]);
         ~~~~~^~~~~~~~~~~~~~
#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...