# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
392846 | 2021-04-21T22:04:37 Z | rainboy | Baloni (COCI15_baloni) | C | 97 ms | 3864 KB |
#include <stdio.h> #define A 1000000 int main() { static int kk[A + 1]; int n, ans; scanf("%d", &n); ans = n; while (n--) { int a; scanf("%d", &a); if (kk[a + 1] > 0) kk[a + 1]--, ans--; kk[a]++; } printf("%d\n", ans); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 208 KB | Output is correct |
3 | Correct | 1 ms | 204 KB | Output is correct |
4 | Correct | 1 ms | 204 KB | Output is correct |
5 | Correct | 94 ms | 3864 KB | Output is correct |
6 | Correct | 97 ms | 3712 KB | Output is correct |
7 | Correct | 79 ms | 3084 KB | Output is correct |
8 | Correct | 83 ms | 3084 KB | Output is correct |
9 | Correct | 87 ms | 3460 KB | Output is correct |
10 | Correct | 87 ms | 3344 KB | Output is correct |