6480 | 2023-12-04 15:25:12 | TDI | Ludak Harca | cpp11 | Time limit exceeded 0/100 | 1.098s | 4252 KiB |
#include <iostream>
using namespace std;
int main()
{
short int n, a, mesto,b;
cin>>n;
short int t[n];
for (int i=0; i<n; i++)
cin>>t[i];
for (int i=1; i<7; i++)
{
a=0;
mesto=0;
while (mesto<n)
{
a++;
mesto+=i;
while(mesto<n&&t[mesto]!=0)
mesto+=t[mesto];
}
cout<<a<<" ";
}
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1748 KiB | ||||
2 | Accepted | 3ms | 1992 KiB | ||||
subtask2 | 0/25 | ||||||
3 | Accepted | 3ms | 2240 KiB | ||||
4 | Accepted | 3ms | 2320 KiB | ||||
5 | Accepted | 3ms | 2320 KiB | ||||
6 | Accepted | 4ms | 2464 KiB | ||||
7 | Time limit exceeded | 1.098s | 2724 KiB | ||||
subtask3 | 0/40 | ||||||
8 | Accepted | 3ms | 2776 KiB | ||||
9 | Accepted | 3ms | 2864 KiB | ||||
10 | Accepted | 4ms | 2876 KiB | ||||
11 | Accepted | 7ms | 3156 KiB | ||||
12 | Time limit exceeded | 1.069s | 3480 KiB | ||||
13 | Time limit exceeded | 1.069s | 2612 KiB | ||||
14 | Time limit exceeded | 1.06s | 3296 KiB | ||||
15 | Time limit exceeded | 1.07s | 3624 KiB | ||||
subtask4 | 0/35 | ||||||
16 | Accepted | 4ms | 3724 KiB | ||||
17 | Accepted | 7ms | 3892 KiB | ||||
18 | Accepted | 10ms | 3812 KiB | ||||
19 | Time limit exceeded | 1.085s | 4044 KiB | ||||
20 | Time limit exceeded | 1.046s | 4040 KiB | ||||
21 | Time limit exceeded | 1.085s | 4016 KiB | ||||
22 | Time limit exceeded | 1.062s | 4080 KiB | ||||
23 | Time limit exceeded | 1.074s | 4060 KiB | ||||
24 | Time limit exceeded | 1.062s | 4064 KiB | ||||
25 | Time limit exceeded | 1.077s | 4252 KiB |