26792023-01-18 21:19:41kohumarkSzomjas állatokcpp11Accepted 100/1003ms3800 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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1364 KiB
2Accepted2ms1480 KiB
subtask25/5
3Accepted2ms1708 KiB
4Accepted2ms1984 KiB
5Accepted2ms2152 KiB
subtask320/20
6Accepted2ms1972 KiB
7Accepted2ms1936 KiB
8Accepted2ms2328 KiB
9Accepted2ms2532 KiB
10Accepted2ms2572 KiB
subtask425/25
11Accepted2ms2880 KiB
12Accepted2ms2784 KiB
13Accepted2ms2836 KiB
14Accepted2ms2856 KiB
15Accepted2ms3044 KiB
subtask520/20
16Accepted2ms3044 KiB
17Accepted2ms3088 KiB
18Accepted2ms3380 KiB
19Accepted2ms3296 KiB
20Accepted2ms3516 KiB
subtask630/30
21Accepted2ms3468 KiB
22Accepted2ms3468 KiB
23Accepted2ms3692 KiB
24Accepted2ms3676 KiB
25Accepted2ms3680 KiB
26Accepted2ms3800 KiB