79082024-01-11 20:17:27CsongiZenehallgatáscpp17Runtime error 0/5041ms7436 KiB
#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>

using namespace std;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n, k;
    cin >> n >> k;
    vector<long long> hosszusagok(n);
    vector<long long> idopontok(k);
    unsigned long long egyloop = 0;
    for (long long i = 1; i <= n; i++)
    {
        cin >> hosszusagok[i];
        egyloop += hosszusagok[i];
    }

    for (long long 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/03ms1936 KiB
2Wrong answer0/041ms5084 KiB
3Wrong answer0/23ms2256 KiB
4Wrong answer0/23ms2484 KiB
5Wrong answer0/23ms2696 KiB
6Wrong answer0/33ms2908 KiB
7Wrong answer0/33ms3124 KiB
8Wrong answer0/33ms3224 KiB
9Wrong answer0/241ms6464 KiB
10Wrong answer0/241ms6828 KiB
11Wrong answer0/241ms7116 KiB
12Wrong answer0/241ms6948 KiB
13Wrong answer0/239ms6900 KiB
14Wrong answer0/239ms7164 KiB
15Wrong answer0/239ms7056 KiB
16Wrong answer0/239ms7104 KiB
17Wrong answer0/239ms7352 KiB
18Wrong answer0/239ms7260 KiB
19Wrong answer0/239ms7392 KiB
20Wrong answer0/237ms7428 KiB
21Wrong answer0/237ms7432 KiB
22Wrong answer0/337ms7396 KiB
23Wrong answer0/337ms7388 KiB
24Wrong answer0/337ms7436 KiB