154562025-02-19 17:24:03PappMatyasUtazásszervezés (75 pont)pypy3Runtime error 0/7578ms22800 KiB
#include <iostream>
#include<math.h>

using namespace std;

int main()
{
    int n, k, m, c, A[10] = {0}, x, ans = 0;
    cin >> n >> k >> m >> c;
    for(int i = 0; i < c; i++)
    {
        cin >> x;
        for(int j = 0; j < n; j++)
        {
            if(A[j] < x)
            {
                ans++;
                A[j] = x + m - 1;
                break;
            }
        }
    }
    cout << ans;
}
SubtaskSumTestVerdictTimeMemory
base0/75
1Runtime error0/074ms22744 KiB
2Runtime error0/072ms22648 KiB
3Runtime error0/367ms22704 KiB
4Runtime error0/467ms22732 KiB
5Runtime error0/467ms22748 KiB
6Runtime error0/474ms22760 KiB
7Runtime error0/472ms22652 KiB
8Runtime error0/465ms22800 KiB
9Runtime error0/565ms22636 KiB
10Runtime error0/575ms22644 KiB
11Runtime error0/672ms22760 KiB
12Runtime error0/664ms22728 KiB
13Runtime error0/674ms22760 KiB
14Runtime error0/667ms22764 KiB
15Runtime error0/664ms22576 KiB
16Runtime error0/678ms22612 KiB
17Runtime error0/672ms22776 KiB