3736 | 2023-03-02 16:14:34 | Gabor | Szomjas állatok | cpp11 | Accepted 100/100 | 6ms | 4644 KiB |
#include <iostream>
#include<vector>
using namespace std;
int main()
{
int n,i,m=0,j;
cin>>n;
vector<int> a(n);
for(i=0;i<n;i++)
{
cin>>a.at(i);
for(j=0;j<i;j++)
{
if((a.at(j)!=0)&&(a.at(j)<a.at(i)))
{
a.at(j)=0;
}
}
}
for(i=0;i<n;i++)
{
if(a.at(i)!=0)
m++;
}
cout<<m;
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1812 KiB | ||||
2 | Accepted | 3ms | 2060 KiB | ||||
subtask2 | 5/5 | ||||||
3 | Accepted | 3ms | 2420 KiB | ||||
4 | Accepted | 2ms | 2392 KiB | ||||
5 | Accepted | 3ms | 2628 KiB | ||||
subtask3 | 20/20 | ||||||
6 | Accepted | 2ms | 2728 KiB | ||||
7 | Accepted | 3ms | 2700 KiB | ||||
8 | Accepted | 3ms | 2768 KiB | ||||
9 | Accepted | 3ms | 3024 KiB | ||||
10 | Accepted | 6ms | 3180 KiB | ||||
subtask4 | 25/25 | ||||||
11 | Accepted | 3ms | 3388 KiB | ||||
12 | Accepted | 3ms | 3588 KiB | ||||
13 | Accepted | 3ms | 3832 KiB | ||||
14 | Accepted | 2ms | 3880 KiB | ||||
15 | Accepted | 3ms | 4128 KiB | ||||
subtask5 | 20/20 | ||||||
16 | Accepted | 2ms | 4340 KiB | ||||
17 | Accepted | 2ms | 4424 KiB | ||||
18 | Accepted | 3ms | 4312 KiB | ||||
19 | Accepted | 3ms | 4428 KiB | ||||
20 | Accepted | 3ms | 4552 KiB | ||||
subtask6 | 30/30 | ||||||
21 | Accepted | 3ms | 4636 KiB | ||||
22 | Accepted | 2ms | 4628 KiB | ||||
23 | Accepted | 3ms | 4516 KiB | ||||
24 | Accepted | 3ms | 4644 KiB | ||||
25 | Accepted | 3ms | 4532 KiB | ||||
26 | Accepted | 3ms | 4524 KiB |