32692023-02-23 16:00:59MarkopoloSzomjas állatokcpp14Wrong answer 0/1004ms4756 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 answer3ms1812 KiB
2Wrong answer3ms2064 KiB
subtask20/5
3Wrong answer3ms2276 KiB
4Wrong answer3ms2520 KiB
5Wrong answer3ms2668 KiB
subtask30/20
6Wrong answer3ms2924 KiB
7Wrong answer3ms3160 KiB
8Wrong answer3ms3208 KiB
9Wrong answer4ms3312 KiB
10Wrong answer3ms3380 KiB
subtask40/25
11Wrong answer3ms3524 KiB
12Wrong answer3ms3720 KiB
13Wrong answer3ms3876 KiB
14Wrong answer3ms4112 KiB
15Wrong answer3ms4148 KiB
subtask50/20
16Wrong answer3ms4280 KiB
17Wrong answer3ms4396 KiB
18Wrong answer3ms4604 KiB
19Wrong answer3ms4656 KiB
20Wrong answer3ms4652 KiB
subtask60/30
21Wrong answer3ms4660 KiB
22Wrong answer3ms4640 KiB
23Wrong answer3ms4636 KiB
24Wrong answer4ms4656 KiB
25Wrong answer3ms4756 KiB
26Wrong answer3ms4728 KiB