1713 | 2022-12-01 16:28:58 | Tina0731 | Ludak Harca | cpp11 | Accepted 100/100 | 30ms | 5464 KiB |
#include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int t[n];
for(int i=0;i<n;i++)
cin>>t[i];
int hely=0;
int dob;
for(int i=1;i<7;i++)
{
hely=0;
dob=0;
while(hely<n)
{
hely+=i;
while(t[hely]>0 && hely<n)
{
hely+=t[hely];
}
dob++;
}
cout<<dob<<" ";
}
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1876 KiB | ||||
2 | Accepted | 2ms | 2116 KiB | ||||
subtask2 | 25/25 | ||||||
3 | Accepted | 2ms | 2312 KiB | ||||
4 | Accepted | 2ms | 2568 KiB | ||||
5 | Accepted | 2ms | 2548 KiB | ||||
6 | Accepted | 4ms | 2592 KiB | ||||
7 | Accepted | 19ms | 3528 KiB | ||||
subtask3 | 40/40 | ||||||
8 | Accepted | 2ms | 3000 KiB | ||||
9 | Accepted | 3ms | 3044 KiB | ||||
10 | Accepted | 4ms | 3120 KiB | ||||
11 | Accepted | 7ms | 3504 KiB | ||||
12 | Accepted | 12ms | 3660 KiB | ||||
13 | Accepted | 18ms | 4112 KiB | ||||
14 | Accepted | 24ms | 4564 KiB | ||||
15 | Accepted | 27ms | 4524 KiB | ||||
subtask4 | 35/35 | ||||||
16 | Accepted | 4ms | 4060 KiB | ||||
17 | Accepted | 7ms | 4088 KiB | ||||
18 | Accepted | 9ms | 4072 KiB | ||||
19 | Accepted | 13ms | 4376 KiB | ||||
20 | Accepted | 14ms | 4488 KiB | ||||
21 | Accepted | 18ms | 4580 KiB | ||||
22 | Accepted | 21ms | 4876 KiB | ||||
23 | Accepted | 25ms | 5148 KiB | ||||
24 | Accepted | 25ms | 5232 KiB | ||||
25 | Accepted | 30ms | 5464 KiB |