87942024-01-31 08:40:14CWMLudak Harcacpp17Wrong answer 65/10014ms9484 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 = gates[0];
		int turns = 0;
		while (cur < n) {
			cur += i;
			if(cur<n) cur += gates[cur];
			turns++;
		}
		cout << turns << " ";
	}
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1832 KiB
2Accepted3ms2048 KiB
subtask225/25
3Accepted3ms2392 KiB
4Accepted3ms2536 KiB
5Accepted3ms2740 KiB
6Accepted3ms2876 KiB
7Accepted10ms3696 KiB
subtask340/40
8Accepted3ms3216 KiB
9Accepted3ms3560 KiB
10Accepted4ms3932 KiB
11Accepted4ms4072 KiB
12Accepted7ms4456 KiB
13Accepted9ms5076 KiB
14Accepted12ms5640 KiB
15Accepted13ms6116 KiB
subtask40/35
16Accepted4ms5696 KiB
17Accepted4ms5800 KiB
18Wrong answer6ms6108 KiB
19Wrong answer7ms6428 KiB
20Accepted8ms6736 KiB
21Wrong answer8ms7112 KiB
22Wrong answer10ms7660 KiB
23Wrong answer10ms8028 KiB
24Accepted12ms8848 KiB
25Wrong answer14ms9484 KiB