2122 | 2022-12-21 08:21:59 | Timi | Ludak Harca | cpp11 | Wrong answer 65/100 | 30ms | 4588 KiB |
#include <iostream>
using namespace std;
int main()
{
int n, i, lepes=0;
cin>>n;
int a[n];
for (i=0; i<n; i++)
{
cin>>a[i];
}
for (int j=1; j<=6; j++)
{
lepes=0;
i=0;
while (i<n)
{
lepes++;
i=i+j;
if (i<n)
i=i+a[i];
}
cout<<lepes<<" ";
}
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1876 KiB | ||||
2 | Accepted | 2ms | 2120 KiB | ||||
subtask2 | 25/25 | ||||||
3 | Accepted | 2ms | 2196 KiB | ||||
4 | Accepted | 2ms | 2320 KiB | ||||
5 | Accepted | 2ms | 2404 KiB | ||||
6 | Accepted | 4ms | 2516 KiB | ||||
7 | Accepted | 19ms | 3452 KiB | ||||
subtask3 | 40/40 | ||||||
8 | Accepted | 2ms | 2920 KiB | ||||
9 | Accepted | 3ms | 3076 KiB | ||||
10 | Accepted | 4ms | 3300 KiB | ||||
11 | Accepted | 7ms | 3628 KiB | ||||
12 | Accepted | 12ms | 3780 KiB | ||||
13 | Accepted | 20ms | 4300 KiB | ||||
14 | Accepted | 24ms | 4216 KiB | ||||
15 | Accepted | 27ms | 4524 KiB | ||||
subtask4 | 0/35 | ||||||
16 | Accepted | 4ms | 3808 KiB | ||||
17 | Accepted | 7ms | 3832 KiB | ||||
18 | Wrong answer | 9ms | 3860 KiB | ||||
19 | Wrong answer | 13ms | 4020 KiB | ||||
20 | Accepted | 14ms | 4128 KiB | ||||
21 | Wrong answer | 18ms | 4168 KiB | ||||
22 | Wrong answer | 21ms | 4336 KiB | ||||
23 | Wrong answer | 25ms | 4372 KiB | ||||
24 | Accepted | 24ms | 4412 KiB | ||||
25 | Wrong answer | 30ms | 4588 KiB |