87952024-01-31 08:41:45CWMLudak Harcacpp17Wrong answer 65/10014ms4088 KiB
#include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
#include <queue>
#include <set>
#include <map>

using namespace std;

signed main()
{
	{
		ios_base::sync_with_stdio(0);
		cin.tie(0);
		cout.tie(0);
	}

	int n;
	cin >> n;
	vector<int> gates(n);
	for (size_t i = 0; i < n; i++)
	{
		cin >> gates[i];
	}
	for (size_t i = 1; i <= 6; i++)
	{
		int cur = 0;
		int turns = 0;
		while (cur < n) {
			cur += i;
			if(cur<n) cur += gates[cur];
			turns++;
		}
		cout << turns << " ";
	}
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1824 KiB
2Accepted3ms2204 KiB
subtask225/25
3Accepted3ms2332 KiB
4Accepted3ms2444 KiB
5Accepted3ms2412 KiB
6Accepted4ms2780 KiB
7Accepted10ms3636 KiB
subtask340/40
8Accepted3ms2904 KiB
9Accepted3ms2876 KiB
10Accepted4ms3116 KiB
11Accepted4ms3152 KiB
12Accepted7ms3244 KiB
13Accepted9ms3288 KiB
14Accepted12ms3684 KiB
15Accepted13ms3676 KiB
subtask40/35
16Accepted4ms3048 KiB
17Accepted4ms3068 KiB
18Wrong answer6ms3384 KiB
19Wrong answer7ms3500 KiB
20Accepted8ms3432 KiB
21Wrong answer8ms3564 KiB
22Wrong answer9ms3564 KiB
23Wrong answer10ms3576 KiB
24Accepted12ms3984 KiB
25Wrong answer14ms4088 KiB