79072024-01-11 20:15:58CsongiZenehallgatáscpp17Runtime error 0/50270ms30648 KiB
#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n, k;
    cin >> n >> k;
    vector<long long> hosszusagok(n);
    vector<long long> idopontok(k);
    unsigned long long egyloop = 0;
    for (int i = 1; i <= n; i++)
    {
        cin >> hosszusagok[i];
        egyloop += hosszusagok[i];
    }

    for (int i = 1; i <= k; i++)
    {
        cin >> idopontok[i];
        int maradek = idopontok[i] % hosszusagok[n-1];
        cout << lower_bound(hosszusagok.begin(), hosszusagok.end(), idopontok[i]) - hosszusagok.begin() + 1 << " ";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Runtime error0/03ms1924 KiB
2Wrong answer0/0187ms6456 KiB
3Wrong answer0/24ms3912 KiB
4Wrong answer0/24ms4080 KiB
5Wrong answer0/24ms4324 KiB
6Wrong answer0/34ms4436 KiB
7Wrong answer0/34ms4716 KiB
8Wrong answer0/34ms5076 KiB
9Wrong answer0/2197ms9740 KiB
10Time limit exceeded0/2259ms11312 KiB
11Time limit exceeded0/2233ms13060 KiB
12Wrong answer0/2187ms14676 KiB
13Wrong answer0/2181ms16148 KiB
14Time limit exceeded0/2208ms17628 KiB
15Time limit exceeded0/2257ms18944 KiB
16Time limit exceeded0/2270ms17968 KiB
17Time limit exceeded0/2207ms21860 KiB
18Time limit exceeded0/2209ms23096 KiB
19Time limit exceeded0/2250ms24416 KiB
20Time limit exceeded0/2221ms25528 KiB
21Time limit exceeded0/2206ms26612 KiB
22Time limit exceeded0/3266ms25976 KiB
23Wrong answer0/3174ms29480 KiB
24Time limit exceeded0/3209ms30648 KiB