245282026-02-12 17:22:34AkosVagyokEmborZenehallgatáscpp17Wrong answer 0/50300ms32000 KiB
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
vector <int> zenek, st, seg;
int zsz, sszam, sum;
void be() {
    cin >> zsz>>sszam;
    zenek.resize(zsz+1);
    st.resize(sszam + 1);
    for (int i = 1; i <= zsz; i++) {
        cin >> zenek[i];
        sum += zenek[i];
        if (i != 1) {
            zenek[i] += zenek[i - 1];
        }
    }
    for (int i = 1; i <= sszam; i++) {
        cin >> st[i];        
    }
    int index = 0;
    seg.resize(sum + 1);
}
void nagy() {
    for (int k = 1; k <= sszam; k++) {
        int a;
        a = st[k] % sum;
        for (int i = 1; i <= sum; i++) {
            if (a==i) {
                cout << seg[i]<<' ';
                break;
            }

        }
    }
}



int main()
{
    be();
    nagy();

    
}

SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/01ms316 KiB
2Runtime error0/098ms32000 KiB
3Time limit exceeded0/2289ms19788 KiB
4Time limit exceeded0/2289ms10036 KiB
5Wrong answer0/2123ms2548 KiB
6Wrong answer0/313ms564 KiB
7Wrong answer0/38ms504 KiB
8Wrong answer0/33ms508 KiB
9Runtime error0/2104ms32000 KiB
10Runtime error0/2104ms32000 KiB
11Runtime error0/298ms32000 KiB
12Runtime error0/2103ms32000 KiB
13Runtime error0/293ms32000 KiB
14Runtime error0/2100ms32000 KiB
15Runtime error0/2101ms32000 KiB
16Runtime error0/2100ms32000 KiB
17Runtime error0/2100ms32000 KiB
18Time limit exceeded0/2300ms20784 KiB
19Time limit exceeded0/2287ms20920 KiB
20Time limit exceeded0/2287ms3244 KiB
21Time limit exceeded0/2287ms3244 KiB
22Time limit exceeded0/3289ms3124 KiB
23Time limit exceeded0/3284ms2112 KiB
24Time limit exceeded0/3284ms1964 KiB