# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
392847 | rainboy | Baloni (COCI15_baloni) | C11 | 98 ms | 272 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
#define A 1000000
int main() {
static int kk[A + 2];
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 (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |