21222022-12-21 08:21:59TimiLudak Harcacpp11Wrong answer 65/10030ms4588 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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1876 KiB
2Accepted2ms2120 KiB
subtask225/25
3Accepted2ms2196 KiB
4Accepted2ms2320 KiB
5Accepted2ms2404 KiB
6Accepted4ms2516 KiB
7Accepted19ms3452 KiB
subtask340/40
8Accepted2ms2920 KiB
9Accepted3ms3076 KiB
10Accepted4ms3300 KiB
11Accepted7ms3628 KiB
12Accepted12ms3780 KiB
13Accepted20ms4300 KiB
14Accepted24ms4216 KiB
15Accepted27ms4524 KiB
subtask40/35
16Accepted4ms3808 KiB
17Accepted7ms3832 KiB
18Wrong answer9ms3860 KiB
19Wrong answer13ms4020 KiB
20Accepted14ms4128 KiB
21Wrong answer18ms4168 KiB
22Wrong answer21ms4336 KiB
23Wrong answer25ms4372 KiB
24Accepted24ms4412 KiB
25Wrong answer30ms4588 KiB