3268 | 2023-02-23 16:00:36 | Markopolo | Szomjas állatok | cpp14 | Wrong answer 0/100 | 4ms | 4244 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 | 1680 KiB | ||||
2 | Wrong answer | 3ms | 1932 KiB | ||||
subtask2 | 0/5 | ||||||
3 | Wrong answer | 3ms | 2148 KiB | ||||
4 | Wrong answer | 3ms | 2284 KiB | ||||
5 | Wrong answer | 3ms | 2528 KiB | ||||
subtask3 | 0/20 | ||||||
6 | Wrong answer | 3ms | 2740 KiB | ||||
7 | Wrong answer | 3ms | 2948 KiB | ||||
8 | Wrong answer | 3ms | 3156 KiB | ||||
9 | Wrong answer | 3ms | 3152 KiB | ||||
10 | Wrong answer | 3ms | 3076 KiB | ||||
subtask4 | 0/25 | ||||||
11 | Wrong answer | 3ms | 3316 KiB | ||||
12 | Wrong answer | 3ms | 3404 KiB | ||||
13 | Wrong answer | 3ms | 3292 KiB | ||||
14 | Wrong answer | 3ms | 3408 KiB | ||||
15 | Wrong answer | 3ms | 3536 KiB | ||||
subtask5 | 0/20 | ||||||
16 | Wrong answer | 3ms | 3624 KiB | ||||
17 | Wrong answer | 3ms | 3820 KiB | ||||
18 | Wrong answer | 3ms | 3856 KiB | ||||
19 | Wrong answer | 3ms | 3976 KiB | ||||
20 | Wrong answer | 3ms | 3972 KiB | ||||
subtask6 | 0/30 | ||||||
21 | Wrong answer | 3ms | 3996 KiB | ||||
22 | Wrong answer | 3ms | 4096 KiB | ||||
23 | Wrong answer | 3ms | 4120 KiB | ||||
24 | Wrong answer | 4ms | 4120 KiB | ||||
25 | Wrong answer | 3ms | 4228 KiB | ||||
26 | Wrong answer | 3ms | 4244 KiB |