122292024-12-10 10:21:09szasztundeZenehallgatáscpp17Wrong answer 2/50233ms32000 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/050ms32000 KiB
3Runtime error0/261ms32000 KiB
4Accepted2/228ms16776 KiB
5Wrong answer0/27ms2472 KiB
6Wrong answer0/33ms692 KiB
7Wrong answer0/33ms584 KiB
8Wrong answer0/33ms512 KiB
9Runtime error0/261ms32000 KiB
10Runtime error0/252ms32000 KiB
11Runtime error0/261ms32000 KiB
12Runtime error0/250ms32000 KiB
13Runtime error0/252ms32000 KiB
14Runtime error0/264ms32000 KiB
15Runtime error0/252ms32000 KiB
16Runtime error0/265ms32000 KiB
17Runtime error0/257ms32000 KiB
18Runtime error0/275ms32000 KiB
19Runtime error0/264ms32000 KiB
20Time limit exceeded0/2221ms4400 KiB
21Time limit exceeded0/2233ms4468 KiB
22Time limit exceeded0/3232ms4516 KiB
23Time limit exceeded0/3223ms2044 KiB
24Time limit exceeded0/3203ms1708 KiB