Submission #204465

#TimeUsernameProblemLanguageResultExecution timeMemory
20446514kg방 배정 (KOI16_aa)C++11
100 / 100
6 ms376 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)

aa.cpp: In function 'int main()':
aa.cpp:8:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %d", &n, &k);
  ~~~~~^~~~~~~~~~~~~~~~~
aa.cpp:10:8: warning: ignoring return value of 'int scanf(const char*, ...)', 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...