3270 | 2023-02-23 16:02:30 | Markopolo | Szomjas állatok | cpp14 | Accepted 100/100 | 4ms | 3956 KiB |
#include <iostream>
#include<vector>
using namespace std;
int main()
{
int n,i,x,j;
cin>>n;
vector<int> s;
vector<int>::iterator it;
for(i=0;i<n;i++)
{
cin>>x;
s.push_back(x);
for(j=0;j<s.size()-1;j++)
{
it=s.begin()+j;
if(x>s.at(j))
{
s.erase(it);
j--;
}
}
}
cout<<s.size();
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1680 KiB | ||||
2 | Accepted | 3ms | 1844 KiB | ||||
subtask2 | 5/5 | ||||||
3 | Accepted | 3ms | 2064 KiB | ||||
4 | Accepted | 3ms | 2300 KiB | ||||
5 | Accepted | 3ms | 2512 KiB | ||||
subtask3 | 20/20 | ||||||
6 | Accepted | 3ms | 2640 KiB | ||||
7 | Accepted | 3ms | 2712 KiB | ||||
8 | Accepted | 3ms | 2960 KiB | ||||
9 | Accepted | 3ms | 3096 KiB | ||||
10 | Accepted | 3ms | 3308 KiB | ||||
subtask4 | 25/25 | ||||||
11 | Accepted | 2ms | 3380 KiB | ||||
12 | Accepted | 3ms | 3388 KiB | ||||
13 | Accepted | 3ms | 3476 KiB | ||||
14 | Accepted | 3ms | 3456 KiB | ||||
15 | Accepted | 3ms | 3392 KiB | ||||
subtask5 | 20/20 | ||||||
16 | Accepted | 3ms | 3396 KiB | ||||
17 | Accepted | 3ms | 3512 KiB | ||||
18 | Accepted | 3ms | 3512 KiB | ||||
19 | Accepted | 3ms | 3508 KiB | ||||
20 | Accepted | 3ms | 3400 KiB | ||||
subtask6 | 30/30 | ||||||
21 | Accepted | 3ms | 3404 KiB | ||||
22 | Accepted | 3ms | 3532 KiB | ||||
23 | Accepted | 3ms | 3620 KiB | ||||
24 | Accepted | 4ms | 3860 KiB | ||||
25 | Accepted | 3ms | 3860 KiB | ||||
26 | Accepted | 3ms | 3956 KiB |