Submission #211326

#TimeUsernameProblemLanguageResultExecution timeMemory
211326jh2014방 배정 (KOI16_room)C11
0 / 100
4 ms256 KiB
#include <stdio.h>
int n, k, cnt, d[7][2];
int main() {
	int x, y;
 	
	scanf("%d %d", &n, &k);
	for (int i = 1; i <= n; i++) {
		scanf("%d %d", &y, &x);
		if (d[x][y] == 0) {
			d[x][y] = k, cnt++;
		}
		d[x][y]--;
	} printf("%d", cnt);
}

Compilation message (stderr)

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