25242023-01-16 09:32:03tamasmarkSzomjas állatokcpp17Accepted 100/1004ms3952 KiB
// kodkupa animal.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <deque>

using namespace std;

deque<long long>x;
int n, i,a,db,j;

int main()
{
    cin >> n;
    x.resize(n + 1);
    db = n;
    for (i = 1; i <= n; ++i)
    {
        cin >> x[i];
        for (j = 1; j < i; ++j)
        {
            if (x[j] < x[i]&&x[j])
            {
                x[j] = 0;
                --db;
            }
        } 
    }
    cout << db;
    return 0;
}
/*
5
3 7 2 5 4
*/
// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu

// Tips for Getting Started: 
//   1. Use the Solution Explorer window to add/manage files
//   2. Use the Team Explorer window to connect to source control
//   3. Use the Output window to see build output and other messages
//   4. Use the Error List window to view errors
//   5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
//   6. In the future, to open this project again, go to File > Open > Project and select the .sln file
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1688 KiB
2Accepted2ms1864 KiB
subtask25/5
3Accepted2ms2108 KiB
4Accepted2ms2348 KiB
5Accepted2ms2388 KiB
subtask320/20
6Accepted2ms2388 KiB
7Accepted2ms2660 KiB
8Accepted3ms2848 KiB
9Accepted4ms3036 KiB
10Accepted4ms3012 KiB
subtask425/25
11Accepted2ms3136 KiB
12Accepted2ms3212 KiB
13Accepted2ms3208 KiB
14Accepted2ms3336 KiB
15Accepted2ms3588 KiB
subtask520/20
16Accepted2ms3764 KiB
17Accepted2ms3716 KiB
18Accepted4ms3724 KiB
19Accepted4ms3832 KiB
20Accepted4ms3788 KiB
subtask630/30
21Accepted2ms3708 KiB
22Accepted2ms3840 KiB
23Accepted3ms3924 KiB
24Accepted4ms3920 KiB
25Accepted4ms3952 KiB
26Accepted4ms3932 KiB