Submission #79818

#TimeUsernameProblemLanguageResultExecution timeMemory
79818pzdbaCOCI17_cezar (COCI17_cezar)C++14
50 / 50
2 ms800 KiB
#include <bits/stdc++.h> using namespace std; int dp[12]; int main(){ int n, a, sum = 0; scanf("%d", &n); bool ok = 1; for(int i=1;i<=n;i++){ scanf("%d", &a); sum += a; dp[a]++; if(dp[a] > 4) ok = 0; } if(sum >= 20) ok = 0; if(!ok) return !printf("DOSTA\n"); sum = 21-sum; int tot = 0; for(int i=2;i<=min(sum, 11);i++){ tot += 4-dp[i]; } if(52 - n - tot >= tot) printf("DOSTA\n"); else printf("VUCI\n"); }

Compilation message (stderr)

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