Submission #42290

#TimeUsernameProblemLanguageResultExecution timeMemory
42290milmillinCOCI17_cezar (COCI17_cezar)C++14
50 / 50
3 ms604 KiB
#include <cstdio> using namespace std; int cnt[12]; int main () { cnt[2]=4; cnt[3]=4; cnt[4]=4; cnt[5]=4; cnt[6]=4; cnt[7]=4; cnt[8]=4; cnt[9]=4; cnt[10]=12; cnt[11]=4; int n; scanf("%d",&n); int x; int sum=21; for (int i=0;i<n;i++) { scanf("%d",&x); cnt[x]--; sum-=x; } int rmd=0; for (int i=sum;i<=11;i++) { rmd+=cnt[i]; } int xx=0; for (int i=1;i<=sum;i++) { xx+=cnt[i]; } if (rmd>=xx) { printf("DOSTA\n"); } else { printf("VUCI\n"); } return 0; }

Compilation message (stderr)

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