3266 | 2023-02-23 15:58:59 | BalintGeza | Szomjas állatok | cpp11 | Wrong answer 0/100 | 128ms | 4536 KiB |
#include <bits/stdc++.h>
using namespace std;
void kiirmat (vector<int> mat)
{
int i;
cout<<endl;
for(i=0;i<mat.size();i++)
cout<<mat.at(i)<<" ";
cout<<endl;
}
/*
6
5 2 3 7 4 6
9
10 3 2 7 11 9 3 8 4
*/
int main()
{
cout<<"Kerem az allatok szamat: ";
int n, i, j, uj;
cin>>n;
vector<int>meret;
cout<<"Kerem az allatok meretet: ";
for(i=0;i<n;i++)
{
kiirmat(meret);
cin>>uj;
meret.push_back(uj);
for(j=0;j<meret.size()-1;j++)
{
if(uj>meret.at(j))
{
meret.erase(meret.begin()+j);
j--;
}
}
kiirmat(meret);
}
cout<<"A vegen ennyi allat lesz: "<<meret.size()<<endl;
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 3ms | 1812 KiB | ||||
2 | Wrong answer | 3ms | 2052 KiB | ||||
subtask2 | 0/5 | ||||||
3 | Wrong answer | 3ms | 2272 KiB | ||||
4 | Wrong answer | 3ms | 2340 KiB | ||||
5 | Wrong answer | 3ms | 2424 KiB | ||||
subtask3 | 0/20 | ||||||
6 | Wrong answer | 3ms | 2552 KiB | ||||
7 | Wrong answer | 4ms | 2676 KiB | ||||
8 | Wrong answer | 17ms | 2708 KiB | ||||
9 | Wrong answer | 108ms | 3056 KiB | ||||
10 | Wrong answer | 59ms | 3268 KiB | ||||
subtask4 | 0/25 | ||||||
11 | Wrong answer | 3ms | 3340 KiB | ||||
12 | Wrong answer | 3ms | 3556 KiB | ||||
13 | Wrong answer | 4ms | 3620 KiB | ||||
14 | Wrong answer | 3ms | 3756 KiB | ||||
15 | Wrong answer | 3ms | 4000 KiB | ||||
subtask5 | 0/20 | ||||||
16 | Wrong answer | 3ms | 4004 KiB | ||||
17 | Wrong answer | 3ms | 3964 KiB | ||||
18 | Wrong answer | 10ms | 3940 KiB | ||||
19 | Wrong answer | 8ms | 4024 KiB | ||||
20 | Wrong answer | 10ms | 4144 KiB | ||||
subtask6 | 0/30 | ||||||
21 | Wrong answer | 4ms | 4288 KiB | ||||
22 | Wrong answer | 4ms | 4396 KiB | ||||
23 | Wrong answer | 4ms | 4444 KiB | ||||
24 | Wrong answer | 128ms | 4468 KiB | ||||
25 | Wrong answer | 8ms | 4460 KiB | ||||
26 | Wrong answer | 8ms | 4536 KiB |