32682023-02-23 16:00:36MarkopoloSzomjas állatokcpp14Wrong answer 0/1004ms4244 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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer3ms1680 KiB
2Wrong answer3ms1932 KiB
subtask20/5
3Wrong answer3ms2148 KiB
4Wrong answer3ms2284 KiB
5Wrong answer3ms2528 KiB
subtask30/20
6Wrong answer3ms2740 KiB
7Wrong answer3ms2948 KiB
8Wrong answer3ms3156 KiB
9Wrong answer3ms3152 KiB
10Wrong answer3ms3076 KiB
subtask40/25
11Wrong answer3ms3316 KiB
12Wrong answer3ms3404 KiB
13Wrong answer3ms3292 KiB
14Wrong answer3ms3408 KiB
15Wrong answer3ms3536 KiB
subtask50/20
16Wrong answer3ms3624 KiB
17Wrong answer3ms3820 KiB
18Wrong answer3ms3856 KiB
19Wrong answer3ms3976 KiB
20Wrong answer3ms3972 KiB
subtask60/30
21Wrong answer3ms3996 KiB
22Wrong answer3ms4096 KiB
23Wrong answer3ms4120 KiB
24Wrong answer4ms4120 KiB
25Wrong answer3ms4228 KiB
26Wrong answer3ms4244 KiB