Submission #469959

# Submission time Handle Problem Language Result Execution time Memory
469959 2021-09-02T12:33:03 Z rainboy COCI17_cezar (COCI17_cezar) C
50 / 50
1 ms 276 KB
#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

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 time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 208 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 276 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 272 KB Output is correct