32662023-02-23 15:58:59BalintGezaSzomjas állatokcpp11Wrong answer 0/100128ms4536 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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer3ms1812 KiB
2Wrong answer3ms2052 KiB
subtask20/5
3Wrong answer3ms2272 KiB
4Wrong answer3ms2340 KiB
5Wrong answer3ms2424 KiB
subtask30/20
6Wrong answer3ms2552 KiB
7Wrong answer4ms2676 KiB
8Wrong answer17ms2708 KiB
9Wrong answer108ms3056 KiB
10Wrong answer59ms3268 KiB
subtask40/25
11Wrong answer3ms3340 KiB
12Wrong answer3ms3556 KiB
13Wrong answer4ms3620 KiB
14Wrong answer3ms3756 KiB
15Wrong answer3ms4000 KiB
subtask50/20
16Wrong answer3ms4004 KiB
17Wrong answer3ms3964 KiB
18Wrong answer10ms3940 KiB
19Wrong answer8ms4024 KiB
20Wrong answer10ms4144 KiB
subtask60/30
21Wrong answer4ms4288 KiB
22Wrong answer4ms4396 KiB
23Wrong answer4ms4444 KiB
24Wrong answer128ms4468 KiB
25Wrong answer8ms4460 KiB
26Wrong answer8ms4536 KiB