Submission #483427

# Submission time Handle Problem Language Result Execution time Memory
483427 2021-10-29T12:14:17 Z rainboy Pizza (COCI21_pizza) C
50 / 50
1 ms 280 KB
#include <stdio.h>

#define A	100

int main() {
	static char bad[A];
	int n, m, cnt;

	scanf("%d", &n);
	while (n--) {
		int a;

		scanf("%d", &a), a--;
		bad[a] = 1;
	}
	scanf("%d", &m);
	cnt = 0;
	while (m--) {
		int k, good;

		scanf("%d", &k);
		good = 1;
		while (k--) {
			int a;

			scanf("%d", &a), a--;
			if (bad[a])
				good = 0;
		}
		if (good)
			cnt++;
	}
	printf("%d\n", cnt);
	return 0;
}

Compilation message

Main.c: In function 'main':
Main.c:9:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 |  scanf("%d", &n);
      |  ^~~~~~~~~~~~~~~
Main.c:13:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   13 |   scanf("%d", &a), a--;
      |   ^~~~~~~~~~~~~~~
Main.c:16:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   16 |  scanf("%d", &m);
      |  ^~~~~~~~~~~~~~~
Main.c:21:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   21 |   scanf("%d", &k);
      |   ^~~~~~~~~~~~~~~
Main.c:26:4: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   26 |    scanf("%d", &a), a--;
      |    ^~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 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
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 280 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
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct