2679 | 2023-01-18 21:19:41 | kohumark | Szomjas állatok | cpp11 | Accepted 100/100 | 3ms | 3800 KiB |
#include <stdio.h>
int main() {
int N, i, count = 0;
scanf("%d", &N);
int S[N];
for (i = 0; i < N; i++) {
scanf("%d", &S[i]);
}
int max = 0;
for (i = N-1; i > -1; i--) {
if (S[i] >= max) {
max = S[i];
count++;
}
}
printf("%d\n", count);
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1364 KiB | ||||
2 | Accepted | 2ms | 1480 KiB | ||||
subtask2 | 5/5 | ||||||
3 | Accepted | 2ms | 1708 KiB | ||||
4 | Accepted | 2ms | 1984 KiB | ||||
5 | Accepted | 2ms | 2152 KiB | ||||
subtask3 | 20/20 | ||||||
6 | Accepted | 2ms | 1972 KiB | ||||
7 | Accepted | 2ms | 1936 KiB | ||||
8 | Accepted | 2ms | 2328 KiB | ||||
9 | Accepted | 2ms | 2532 KiB | ||||
10 | Accepted | 2ms | 2572 KiB | ||||
subtask4 | 25/25 | ||||||
11 | Accepted | 2ms | 2880 KiB | ||||
12 | Accepted | 2ms | 2784 KiB | ||||
13 | Accepted | 2ms | 2836 KiB | ||||
14 | Accepted | 2ms | 2856 KiB | ||||
15 | Accepted | 2ms | 3044 KiB | ||||
subtask5 | 20/20 | ||||||
16 | Accepted | 2ms | 3044 KiB | ||||
17 | Accepted | 2ms | 3088 KiB | ||||
18 | Accepted | 2ms | 3380 KiB | ||||
19 | Accepted | 2ms | 3296 KiB | ||||
20 | Accepted | 2ms | 3516 KiB | ||||
subtask6 | 30/30 | ||||||
21 | Accepted | 2ms | 3468 KiB | ||||
22 | Accepted | 2ms | 3468 KiB | ||||
23 | Accepted | 2ms | 3692 KiB | ||||
24 | Accepted | 2ms | 3676 KiB | ||||
25 | Accepted | 2ms | 3680 KiB | ||||
26 | Accepted | 2ms | 3800 KiB |