17122022-12-01 16:27:47Tina0731Ludak Harcacpp11Time limit exceeded 0/1001.1s3532 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)
            {
                if(hely<n)
                    hely+=t[hely];
            }
            dob++;
        }
        cout<<dob<<" ";
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Time limit exceeded1.057s1844 KiB
2Time limit exceeded1.049s1348 KiB
subtask20/25
3Time limit exceeded1.069s1468 KiB
4Time limit exceeded1.037s2548 KiB
5Time limit exceeded1.072s2572 KiB
6Time limit exceeded1.044s2880 KiB
7Time limit exceeded1.057s2308 KiB
subtask30/40
8Time limit exceeded1.08s2944 KiB
9Time limit exceeded1.08s3016 KiB
10Time limit exceeded1.059s2428 KiB
11Time limit exceeded1.072s2388 KiB
12Time limit exceeded1.072s2764 KiB
13Time limit exceeded1.08s2868 KiB
14Time limit exceeded1.08s3164 KiB
15Time limit exceeded1.069s3196 KiB
subtask40/35
16Time limit exceeded1.052s2656 KiB
17Time limit exceeded1.057s3484 KiB
18Time limit exceeded1.06s2780 KiB
19Time limit exceeded1.044s2824 KiB
20Time limit exceeded1.065s3104 KiB
21Time limit exceeded1.1s3116 KiB
22Time limit exceeded1.07s3232 KiB
23Time limit exceeded1.057s3496 KiB
24Time limit exceeded1.032s3384 KiB
25Time limit exceeded1.06s3532 KiB