64792023-12-04 15:16:28ct72Ludak Harcacpp11Runtime error 0/10032ms5116 KiB
#include <iostream>

using namespace std;

int main()
{
   int N;
   cin>>N;
   int a[N];
   for(int i=0;i<N;i++)
    cin>>a[i];
   int m;
   for(int i=1;i<=6;i++)
   {
       m=0;
        for(int j=0;j<=N;)
        {
         m++;
         j=j+i;
         while(a[j]!=0)
         {
         j=j+a[j];
         }
        }
       cout<<m<<" ";
   }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Runtime error3ms1848 KiB
2Runtime error3ms2020 KiB
subtask20/25
3Runtime error3ms2300 KiB
4Runtime error3ms2432 KiB
5Runtime error3ms2712 KiB
6Runtime error4ms2840 KiB
7Runtime error19ms3632 KiB
subtask30/40
8Runtime error3ms3140 KiB
9Runtime error4ms3288 KiB
10Runtime error4ms3464 KiB
11Runtime error7ms3548 KiB
12Runtime error13ms3852 KiB
13Runtime error19ms4340 KiB
14Runtime error25ms4372 KiB
15Runtime error28ms4728 KiB
subtask40/35
16Runtime error4ms4164 KiB
17Runtime error7ms4272 KiB
18Runtime error10ms4568 KiB
19Runtime error14ms4708 KiB
20Runtime error14ms4744 KiB
21Runtime error19ms5020 KiB
22Runtime error23ms4816 KiB
23Runtime error26ms4988 KiB
24Runtime error25ms5028 KiB
25Runtime error32ms5116 KiB