3269 | 2023-02-23 16:00:59 | Markopolo | Szomjas állatok | cpp14 | Wrong answer 0/100 | 4ms | 4756 KiB |
#include <iostream>
#include<vector>
using namespace std;
int main()
{
int n,i,x,j;
cout << "Add meg az allatok szamat!" << endl;
cin>>n;
vector<int> s;
vector<int>::iterator it;
cout<<"Add mega az allatok ,,erteket'' "<<endl;
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<<"Az itatohoz hozzafero allatok szama: "<<s.size()<<endl;
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 3ms | 1812 KiB | ||||
2 | Wrong answer | 3ms | 2064 KiB | ||||
subtask2 | 0/5 | ||||||
3 | Wrong answer | 3ms | 2276 KiB | ||||
4 | Wrong answer | 3ms | 2520 KiB | ||||
5 | Wrong answer | 3ms | 2668 KiB | ||||
subtask3 | 0/20 | ||||||
6 | Wrong answer | 3ms | 2924 KiB | ||||
7 | Wrong answer | 3ms | 3160 KiB | ||||
8 | Wrong answer | 3ms | 3208 KiB | ||||
9 | Wrong answer | 4ms | 3312 KiB | ||||
10 | Wrong answer | 3ms | 3380 KiB | ||||
subtask4 | 0/25 | ||||||
11 | Wrong answer | 3ms | 3524 KiB | ||||
12 | Wrong answer | 3ms | 3720 KiB | ||||
13 | Wrong answer | 3ms | 3876 KiB | ||||
14 | Wrong answer | 3ms | 4112 KiB | ||||
15 | Wrong answer | 3ms | 4148 KiB | ||||
subtask5 | 0/20 | ||||||
16 | Wrong answer | 3ms | 4280 KiB | ||||
17 | Wrong answer | 3ms | 4396 KiB | ||||
18 | Wrong answer | 3ms | 4604 KiB | ||||
19 | Wrong answer | 3ms | 4656 KiB | ||||
20 | Wrong answer | 3ms | 4652 KiB | ||||
subtask6 | 0/30 | ||||||
21 | Wrong answer | 3ms | 4660 KiB | ||||
22 | Wrong answer | 3ms | 4640 KiB | ||||
23 | Wrong answer | 3ms | 4636 KiB | ||||
24 | Wrong answer | 4ms | 4656 KiB | ||||
25 | Wrong answer | 3ms | 4756 KiB | ||||
26 | Wrong answer | 3ms | 4728 KiB |