Submission #469959

#TimeUsernameProblemLanguageResultExecution timeMemory
469959rainboyCOCI17_cezar (COCI17_cezar)C11
50 / 50
1 ms276 KiB
#include <stdio.h> #define A 11 int main() { static int kk[A + 1]; int n, a, d, k; scanf("%d", &n); d = 21; while (n--) { scanf("%d", &a); d -= a; kk[a]++; } if (d < 2) { printf("DOSTA\n"); return 0; } k = 0; for (a = 2; a <= A && a <= d; a++) k += (a == 10 ? 16 : 4) - kk[a]; for (a = d + 1; a <= A; a++) k -= (a == 10 ? 16 : 4) - kk[a]; printf(k <= 0 ? "DOSTA\n" : "VUCI\n"); return 0; }

Compilation message (stderr)

cezar.c: In function 'main':
cezar.c:9:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 |  scanf("%d", &n);
      |  ^~~~~~~~~~~~~~~
cezar.c:12:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |   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...