10081 | 2024-03-26 17:04:06 | Ancsa | Szomjas állatok | cpp17 | Accepted 100/100 | 3ms | 3572 KiB |
#include <iostream>
using namespace std;
int main()
{
int n, torlo, szam=0;
cin>>n;
int s[n];
for(int i=0;i<n;i++)
{
cin>>s[i];
}
torlo=s[n-1];
for(int i=n-1;i>=0;i--)
{
if(s[i]>=torlo)
{
torlo=s[i];
szam++;
}
}
cout<<szam;
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 2004 KiB | ||||
2 | Accepted | 3ms | 2068 KiB | ||||
subtask2 | 5/5 | ||||||
3 | Accepted | 3ms | 2188 KiB | ||||
4 | Accepted | 3ms | 2264 KiB | ||||
5 | Accepted | 3ms | 2688 KiB | ||||
subtask3 | 20/20 | ||||||
6 | Accepted | 3ms | 2884 KiB | ||||
7 | Accepted | 3ms | 2684 KiB | ||||
8 | Accepted | 3ms | 2876 KiB | ||||
9 | Accepted | 3ms | 2964 KiB | ||||
10 | Accepted | 3ms | 2964 KiB | ||||
subtask4 | 25/25 | ||||||
11 | Accepted | 3ms | 3100 KiB | ||||
12 | Accepted | 3ms | 3252 KiB | ||||
13 | Accepted | 2ms | 3180 KiB | ||||
14 | Accepted | 3ms | 3284 KiB | ||||
15 | Accepted | 3ms | 3292 KiB | ||||
subtask5 | 20/20 | ||||||
16 | Accepted | 3ms | 3328 KiB | ||||
17 | Accepted | 2ms | 3200 KiB | ||||
18 | Accepted | 3ms | 3328 KiB | ||||
19 | Accepted | 3ms | 3404 KiB | ||||
20 | Accepted | 3ms | 3412 KiB | ||||
subtask6 | 30/30 | ||||||
21 | Accepted | 3ms | 3416 KiB | ||||
22 | Accepted | 3ms | 3420 KiB | ||||
23 | Accepted | 3ms | 3428 KiB | ||||
24 | Accepted | 3ms | 3428 KiB | ||||
25 | Accepted | 3ms | 3456 KiB | ||||
26 | Accepted | 3ms | 3572 KiB |