Submission #924251

#TimeUsernameProblemLanguageResultExecution timeMemory
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; }

Compilation message (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...