64742023-12-03 11:52:00xxxUtazásszervezés (75 pont)cpp14Wrong answer 15/756ms4176 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n, k, m, c;
	cin >> n >> k >> m >> c;
    vector<int> gs(c);
    for(int i = 0; i < c; i++) {
        cin >> gs[i];
    }

    vector<int> mettol(n, 1);
    int ans = 0;

    for(int i = 0; i < c; i++) {
        for(int j = 0; j < n; j++) {
            if (mettol[j] <= gs[i]) {
                mettol[j] += m;
                ans++;
                j = n;
            }
        }
    }

    cout << ans << '\n';

	return 0;
}
SubtaskSumTestVerdictTimeMemory
base15/75
1Accepted0/03ms1808 KiB
2Wrong answer0/06ms2172 KiB
3Accepted3/33ms2332 KiB
4Accepted4/42ms2444 KiB
5Accepted4/43ms2648 KiB
6Accepted4/43ms2856 KiB
7Wrong answer0/43ms3076 KiB
8Wrong answer0/43ms3032 KiB
9Wrong answer0/53ms3168 KiB
10Wrong answer0/53ms3252 KiB
11Wrong answer0/64ms3392 KiB
12Wrong answer0/64ms3632 KiB
13Wrong answer0/64ms3848 KiB
14Wrong answer0/66ms3924 KiB
15Wrong answer0/66ms4176 KiB
16Wrong answer0/66ms4136 KiB
17Wrong answer0/66ms4144 KiB