21202022-12-21 08:08:26TimiLudak Harcacpp11Wrong answer 65/10030ms5016 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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1748 KiB
2Accepted2ms1992 KiB
subtask225/25
3Accepted2ms2156 KiB
4Accepted2ms2192 KiB
5Accepted2ms2432 KiB
6Accepted4ms2604 KiB
7Accepted19ms3500 KiB
subtask340/40
8Accepted2ms2812 KiB
9Accepted3ms2944 KiB
10Accepted4ms3176 KiB
11Accepted7ms3288 KiB
12Accepted12ms3624 KiB
13Accepted18ms4084 KiB
14Accepted25ms4516 KiB
15Accepted27ms4708 KiB
subtask40/35
16Accepted4ms4068 KiB
17Accepted7ms4008 KiB
18Wrong answer9ms4176 KiB
19Wrong answer13ms4356 KiB
20Accepted14ms4492 KiB
21Wrong answer18ms4784 KiB
22Wrong answer21ms4948 KiB
23Wrong answer25ms4812 KiB
24Accepted24ms4848 KiB
25Wrong answer30ms5016 KiB