122302024-12-10 10:21:41szasztundeZenehallgatáscpp11Wrong answer 2/50238ms32000 KiB
#include <iostream>
//#include <fstream>
#include <vector>
using namespace std;
vector <int> a;
int main()
{
    int n,k,h=0,x;
    //ifstream fin("be2.txt");
    cin>>n>>k;
    for(int i=1;i<=n;i++)
    {
        cin>>x;
        for(int j=1;j<=x;j++)
        {
            h++;
            a.push_back(i);
        }
    }
    for(int i=1;i<=k;i++)
    {
        cin>>x;
        cout<<a[x%h]<<" ";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base2/50
1Wrong answer0/01ms320 KiB
2Runtime error0/061ms32000 KiB
3Runtime error0/250ms32000 KiB
4Accepted2/228ms16776 KiB
5Wrong answer0/27ms2472 KiB
6Wrong answer0/33ms692 KiB
7Wrong answer0/33ms648 KiB
8Wrong answer0/33ms320 KiB
9Runtime error0/261ms32000 KiB
10Runtime error0/250ms32000 KiB
11Runtime error0/259ms32000 KiB
12Runtime error0/250ms32000 KiB
13Runtime error0/263ms32000 KiB
14Runtime error0/254ms32000 KiB
15Runtime error0/265ms32000 KiB
16Runtime error0/254ms32000 KiB
17Runtime error0/270ms32000 KiB
18Runtime error0/276ms32000 KiB
19Runtime error0/265ms32000 KiB
20Time limit exceeded0/2224ms4456 KiB
21Time limit exceeded0/2238ms4516 KiB
22Time limit exceeded0/3233ms4528 KiB
23Time limit exceeded0/3224ms1960 KiB
24Time limit exceeded0/3210ms1708 KiB