Submission #917333

#TimeUsernameProblemLanguageResultExecution timeMemory
917333rainboy딱지놀이 (KOI17_card)C11
100 / 100
11 ms856 KiB
#include <stdio.h>
#include <string.h>

#define N	4

int main() {
	int t;

	scanf("%d", &t);
	while (t--) {
		static int kk[N];
		int k, i;
		char c;

		memset(kk, 0, N * sizeof *kk);
		scanf("%d", &k);
		while (k--) {
			scanf("%d", &i), i--;
			kk[i]++;
		}
		scanf("%d", &k);
		while (k--) {
			scanf("%d", &i), i--;
			kk[i]--;
		}
		c = 'D';
		for (i = N - 1; i >= 0; i--)
			if (kk[i] != 0) {
				c = kk[i] > 0 ? 'A' : 'B';
				break;
			}
		printf("%c\n", c);
	}
	return 0;
}

Compilation message (stderr)

card.c: In function 'main':
card.c:9:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 |  scanf("%d", &t);
      |  ^~~~~~~~~~~~~~~
card.c:16:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   16 |   scanf("%d", &k);
      |   ^~~~~~~~~~~~~~~
card.c:18:4: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   18 |    scanf("%d", &i), i--;
      |    ^~~~~~~~~~~~~~~
card.c:21:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   21 |   scanf("%d", &k);
      |   ^~~~~~~~~~~~~~~
card.c:23:4: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   23 |    scanf("%d", &i), i--;
      |    ^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...