8795 | 2024-01-31 08:41:45 | CWM | Ludak Harca | cpp17 | Wrong answer 65/100 | 14ms | 4088 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 << " ";
}
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1824 KiB | ||||
2 | Accepted | 3ms | 2204 KiB | ||||
subtask2 | 25/25 | ||||||
3 | Accepted | 3ms | 2332 KiB | ||||
4 | Accepted | 3ms | 2444 KiB | ||||
5 | Accepted | 3ms | 2412 KiB | ||||
6 | Accepted | 4ms | 2780 KiB | ||||
7 | Accepted | 10ms | 3636 KiB | ||||
subtask3 | 40/40 | ||||||
8 | Accepted | 3ms | 2904 KiB | ||||
9 | Accepted | 3ms | 2876 KiB | ||||
10 | Accepted | 4ms | 3116 KiB | ||||
11 | Accepted | 4ms | 3152 KiB | ||||
12 | Accepted | 7ms | 3244 KiB | ||||
13 | Accepted | 9ms | 3288 KiB | ||||
14 | Accepted | 12ms | 3684 KiB | ||||
15 | Accepted | 13ms | 3676 KiB | ||||
subtask4 | 0/35 | ||||||
16 | Accepted | 4ms | 3048 KiB | ||||
17 | Accepted | 4ms | 3068 KiB | ||||
18 | Wrong answer | 6ms | 3384 KiB | ||||
19 | Wrong answer | 7ms | 3500 KiB | ||||
20 | Accepted | 8ms | 3432 KiB | ||||
21 | Wrong answer | 8ms | 3564 KiB | ||||
22 | Wrong answer | 9ms | 3564 KiB | ||||
23 | Wrong answer | 10ms | 3576 KiB | ||||
24 | Accepted | 12ms | 3984 KiB | ||||
25 | Wrong answer | 14ms | 4088 KiB |