2524 | 2023-01-16 09:32:03 | tamasmark | Szomjas állatok | cpp17 | Accepted 100/100 | 4ms | 3952 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
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1688 KiB | ||||
2 | Accepted | 2ms | 1864 KiB | ||||
subtask2 | 5/5 | ||||||
3 | Accepted | 2ms | 2108 KiB | ||||
4 | Accepted | 2ms | 2348 KiB | ||||
5 | Accepted | 2ms | 2388 KiB | ||||
subtask3 | 20/20 | ||||||
6 | Accepted | 2ms | 2388 KiB | ||||
7 | Accepted | 2ms | 2660 KiB | ||||
8 | Accepted | 3ms | 2848 KiB | ||||
9 | Accepted | 4ms | 3036 KiB | ||||
10 | Accepted | 4ms | 3012 KiB | ||||
subtask4 | 25/25 | ||||||
11 | Accepted | 2ms | 3136 KiB | ||||
12 | Accepted | 2ms | 3212 KiB | ||||
13 | Accepted | 2ms | 3208 KiB | ||||
14 | Accepted | 2ms | 3336 KiB | ||||
15 | Accepted | 2ms | 3588 KiB | ||||
subtask5 | 20/20 | ||||||
16 | Accepted | 2ms | 3764 KiB | ||||
17 | Accepted | 2ms | 3716 KiB | ||||
18 | Accepted | 4ms | 3724 KiB | ||||
19 | Accepted | 4ms | 3832 KiB | ||||
20 | Accepted | 4ms | 3788 KiB | ||||
subtask6 | 30/30 | ||||||
21 | Accepted | 2ms | 3708 KiB | ||||
22 | Accepted | 2ms | 3840 KiB | ||||
23 | Accepted | 3ms | 3924 KiB | ||||
24 | Accepted | 4ms | 3920 KiB | ||||
25 | Accepted | 4ms | 3952 KiB | ||||
26 | Accepted | 4ms | 3932 KiB |