# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
432506 | 2021-06-18T10:47:55 Z | rainboy | Poi (IOI09_poi) | C | 520 ms | 23676 KB |
#include <stdio.h> #define N 2000 #define T 2000 int main() { static int aa[N][T], kk[T], ss[N]; int n, t, p, i, j, rank; scanf("%d%d%d", &n, &t, &p), p--; for (i = 0; i < n; i++) for (j = 0; j < t; j++) { scanf("%d", &aa[i][j]); if (aa[i][j]) kk[j]++; } for (i = 0; i < n; i++) for (j = 0; j < t; j++) if (aa[i][j]) ss[i] += n - kk[j]; rank = 0; for (i = 0; i < n; i++) if (ss[i] > ss[p] || ss[i] == ss[p] && i <= p) rank++; printf("%d %d\n", ss[p], rank); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Incorrect | 1 ms | 284 KB | Output isn't correct |
4 | Incorrect | 1 ms | 332 KB | Output isn't correct |
5 | Correct | 1 ms | 332 KB | Output is correct |
6 | Correct | 1 ms | 460 KB | Output is correct |
7 | Incorrect | 1 ms | 588 KB | Output isn't correct |
8 | Incorrect | 1 ms | 636 KB | Output isn't correct |
9 | Correct | 2 ms | 716 KB | Output is correct |
10 | Correct | 4 ms | 1176 KB | Output is correct |
11 | Correct | 16 ms | 2124 KB | Output is correct |
12 | Correct | 25 ms | 3460 KB | Output is correct |
13 | Incorrect | 73 ms | 6476 KB | Output isn't correct |
14 | Correct | 102 ms | 9232 KB | Output is correct |
15 | Incorrect | 170 ms | 12496 KB | Output isn't correct |
16 | Correct | 229 ms | 13552 KB | Output is correct |
17 | Correct | 307 ms | 16664 KB | Output is correct |
18 | Correct | 356 ms | 18936 KB | Output is correct |
19 | Correct | 455 ms | 22888 KB | Output is correct |
20 | Correct | 520 ms | 23676 KB | Output is correct |