Help me in solving SRTO3 problem

For the below code I am getting the required output but when I hit the submit button it showing run-time error ?? Can you please help me out

My code

#include <bits/stdc++.h>
using namespace std;
using SIZE = long long;
int main() {
	// your code goes here
	SIZE t;
	cin>>t;
	while(t--)
	{
	    SIZE sizeOfA,sizeOfB;
	    cin>>sizeOfA>>sizeOfB;
	    vector<SIZE> A(sizeOfA),B(sizeOfB);
	    for(SIZE i=0;i<sizeOfA;i++)
	    cin>>A[i];
	    for(SIZE i=0;i<sizeOfB;i++)
	    cin>>B[i];
	    auto start = A.end()-1;
	    //main
	    for(SIZE i=0;i<B.size();i++)
	    {
	       //set start
	       int it = B[i];
	       while(--it)
	       start--;
	       //sort A
	       sort(start,A.end());
	    }
	    for(auto x:A)
	    cout<<x<<" ";
	    cout<<endl;
	}

}

Problem Link: ORST Practice Coding Problem - CodeChef

@ilove_coding
here plzz refer my c++ code for better understanding

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here
    int t;
    cin>>t;
    while(t--)
    {
        int n,m;
        cin>>n>>m;
        int a[n],b[m];
        priority_queue<int,vector<int>,greater<int>> pq;
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
        }
        int mx=0;
        for(int i=0;i<m;i++)
        {
            cin>>b[i];
            mx=max(mx,b[i]);
        }
        int n1=n-mx;
        for(int i=0;i<n1;i++)
        {
            cout<<a[i]<<" ";
        }
        for(int i=n1;i<n;i++)
        {
            pq.push(a[i]);
        }
        while(!pq.empty())
        {
            cout<<pq.top()<<" ";
            pq.pop();
        }
        cout<<endl;
    }
}