89152024-02-04 20:56:16gergomiszoriUtazásszervezés (75 pont)cpp17Wrong answer 15/754ms3292 KiB
#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define endl "\n"
#define pll pair<ll,ll>
#define vll vector<ll>
#define mll map<ll,ll>
#define fs first
#define sc second

const ll MOD = 1e9+7;

void solve()
{
    ll n, k, m, c;
    cin >> n >> k >> m >> c;
    ll ans = 0;
    vector<ll> occ(n, 0);
    for(ll i = 0; i < c; i++)
    {
        ll in;
        cin >> in;
        for(ll &a : occ)
            if(a < in)
            {
                ans++;
                a = in+m-1;
            }
    }
    cout << ans << endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    ll t = 1;
    //cin >> t;
    while(t--)
        solve();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base15/75
1Accepted0/03ms1828 KiB
2Wrong answer0/04ms2020 KiB
3Accepted3/33ms2244 KiB
4Accepted4/42ms2460 KiB
5Accepted4/42ms2440 KiB
6Wrong answer0/43ms2564 KiB
7Accepted4/43ms2680 KiB
8Wrong answer0/42ms2708 KiB
9Wrong answer0/53ms2716 KiB
10Wrong answer0/53ms2712 KiB
11Wrong answer0/63ms2844 KiB
12Wrong answer0/63ms2940 KiB
13Wrong answer0/63ms2920 KiB
14Wrong answer0/64ms3052 KiB
15Wrong answer0/64ms3140 KiB
16Wrong answer0/64ms3136 KiB
17Wrong answer0/64ms3292 KiB