I am getting TLE and SIGSTP I dont know why

#include <iostream>

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

int main() {
int t;
cin>>t;
while(tโ€“)
{
vector v(12,0);
int p,s,n,sum=0;
cin>>n;

    for(int i=0;i<n;i++)
    {
        
        cin>>p>>s;
        
        if((p>=1&&p<=8)&&(s>v[p]))
        {
            v[p]=s;
        }
        
    }
    
    
    cout<<accumulate(v.begin(),v.end(),sum)<<"\n";
    
}
return 0;

}

Please either format your code or link to your submission - the forum software has mangled it and it wonโ€™t compile! :slight_smile:

Also - what Problem are you trying to solve? :slight_smile: