제출 #924251

#제출 시각아이디문제언어결과실행 시간메모리
924251rainboy방 배정 (KOI16_aa)C11
100 / 100
1 ms756 KiB
#include <stdio.h>

#define Y	6

int main() {
	static int kk[Y * 2];
	int n, k, s, y, t, cnt;

	scanf("%d%d", &n, &k);
	while (n--) {
		scanf("%d%d", &s, &y), y--;
		kk[y << 1 | s]++;
	}
	cnt = 0;
	for (t = 0; t < Y * 2; t++)
		cnt += (kk[t] + k - 1) / k;
	printf("%d\n", cnt);
	return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

aa.c: In function 'main':
aa.c:9:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 |  scanf("%d%d", &n, &k);
      |  ^~~~~~~~~~~~~~~~~~~~~
aa.c:11:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |   scanf("%d%d", &s, &y), y--;
      |   ^~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...