57822023-09-27 16:10:57pyramisZenehallgatáscpp11Time limit exceeded 0/50300ms4732 KiB
#include <iostream>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);

    int N, K;
    int j;
    cin >> N;
    cin >> K;

    int hossz[N];
    int idopontok[K];
    int osszeg = 0;

    int osszegek[10001];

    for(int i = 0; i < N; i++){
        cin >> hossz[i];
    }

    for(int i = 0; i < K; i++){
        cin >> idopontok[i];

    osszeg = 0;
        for( j=0; osszeg<idopontok[i]; j++){
            osszeg = osszeg + hossz[j%N];

            }

                cout << j%N <<" ";






        }






    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Accepted0/03ms1892 KiB
2Time limit exceeded0/0300ms2084 KiB
3Time limit exceeded0/2273ms2316 KiB
4Time limit exceeded0/2247ms2528 KiB
5Time limit exceeded0/2248ms2616 KiB
6Time limit exceeded0/3252ms2608 KiB
7Time limit exceeded0/3237ms2704 KiB
8Time limit exceeded0/3252ms2912 KiB
9Time limit exceeded0/2268ms3120 KiB
10Time limit exceeded0/2254ms3268 KiB
11Time limit exceeded0/2270ms3408 KiB
12Time limit exceeded0/2270ms3616 KiB
13Time limit exceeded0/2250ms3620 KiB
14Time limit exceeded0/2257ms3700 KiB
15Time limit exceeded0/2273ms3916 KiB
16Time limit exceeded0/2266ms4128 KiB
17Time limit exceeded0/2254ms4216 KiB
18Time limit exceeded0/2277ms4368 KiB
19Time limit exceeded0/2252ms4424 KiB
20Time limit exceeded0/2245ms4432 KiB
21Time limit exceeded0/2254ms4516 KiB
22Time limit exceeded0/3270ms4516 KiB
23Time limit exceeded0/3264ms4732 KiB
24Time limit exceeded0/3256ms4520 KiB