59812023-10-09 16:55:18MorvaiVarkonyUtazásszervezés (75 pont)cpp11Wrong answer 8/756ms3992 KiB
// Source: https://usaco.guide/general/io

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n,k,m,c;
	cin >> n >> k >> m >> c;
	vector<int> v(c);
	for (int i=0; i<c; i++) {
		cin >> v[i];
	}
	int jo=0;
	for (int i=0; i<n; i++) {
		for (int j=0; j<c; j++) {
			if (v[j]!=0) {
				jo++;
				v[j]=0;
				j+=m-1;
			}
		}
	}
	cout << jo;
}
SubtaskSumTestVerdictTimeMemory
base8/75
1Accepted0/03ms1808 KiB
2Wrong answer0/06ms2228 KiB
3Wrong answer0/33ms2276 KiB
4Wrong answer0/43ms2508 KiB
5Accepted4/42ms2552 KiB
6Wrong answer0/43ms2512 KiB
7Accepted4/42ms2664 KiB
8Wrong answer0/42ms2736 KiB
9Wrong answer0/53ms2868 KiB
10Wrong answer0/53ms2992 KiB
11Wrong answer0/64ms3052 KiB
12Wrong answer0/64ms3324 KiB
13Wrong answer0/64ms3544 KiB
14Wrong answer0/64ms3504 KiB
15Wrong answer0/66ms3840 KiB
16Wrong answer0/66ms3992 KiB
17Wrong answer0/64ms3964 KiB