2120 | 2022-12-21 08:08:26 | Timi | Ludak Harca | cpp11 | Wrong answer 65/100 | 30ms | 5016 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)
{
i=i+a[i];
if (i<n)
{
lepes++;
i=i+j;
}
}
cout<<lepes<<" ";
}
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1748 KiB | ||||
2 | Accepted | 2ms | 1992 KiB | ||||
subtask2 | 25/25 | ||||||
3 | Accepted | 2ms | 2156 KiB | ||||
4 | Accepted | 2ms | 2192 KiB | ||||
5 | Accepted | 2ms | 2432 KiB | ||||
6 | Accepted | 4ms | 2604 KiB | ||||
7 | Accepted | 19ms | 3500 KiB | ||||
subtask3 | 40/40 | ||||||
8 | Accepted | 2ms | 2812 KiB | ||||
9 | Accepted | 3ms | 2944 KiB | ||||
10 | Accepted | 4ms | 3176 KiB | ||||
11 | Accepted | 7ms | 3288 KiB | ||||
12 | Accepted | 12ms | 3624 KiB | ||||
13 | Accepted | 18ms | 4084 KiB | ||||
14 | Accepted | 25ms | 4516 KiB | ||||
15 | Accepted | 27ms | 4708 KiB | ||||
subtask4 | 0/35 | ||||||
16 | Accepted | 4ms | 4068 KiB | ||||
17 | Accepted | 7ms | 4008 KiB | ||||
18 | Wrong answer | 9ms | 4176 KiB | ||||
19 | Wrong answer | 13ms | 4356 KiB | ||||
20 | Accepted | 14ms | 4492 KiB | ||||
21 | Wrong answer | 18ms | 4784 KiB | ||||
22 | Wrong answer | 21ms | 4948 KiB | ||||
23 | Wrong answer | 25ms | 4812 KiB | ||||
24 | Accepted | 24ms | 4848 KiB | ||||
25 | Wrong answer | 30ms | 5016 KiB |