Submission #94559

#TimeUsernameProblemLanguageResultExecution timeMemory
94559thebesCOCI17_cezar (COCI17_cezar)C++14
50 / 50
2 ms396 KiB
#include <bits/stdc++.h> using namespace std; int cnt[15], n, x, i, a, t; int main(){ for(int i=2;i<=9;i++) cnt[i]=4; cnt[10]=12; cnt[11]=4; for(scanf("%d",&n),i=1;i<=n;i++){ scanf("%d",&x); cnt[x]--; t += x; } t = 21-t; for(i=1;i<=t;i++){ a -= cnt[i]; } for(i=t+1;i<=11;i++){ a += cnt[i]; } printf("%s\n",a<0?"VUCI":"DOSTA"); return 0; }

Compilation message (stderr)

cezar.cpp: In function 'int main()':
cezar.cpp:9:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     for(scanf("%d",&n),i=1;i<=n;i++){
         ~~~~~~~~~~~~~~^~~~
cezar.cpp:10:14: 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...