In which particular line I am getting Runtime error ???
Problem code : GSUB (Practice)
Code:
#include<bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t=0,n=0,q=0;
int x=0,y=0,count = 0;
cin>>t;
cin>>n>>q;
vectorv(n+1,0);
while(t–){
for(int i=0; i<n; i++)
cin>>v[i];
for(int i=0; i<q; i++){
cin>>x>>y;
v[x-1] = y;
for(int i = 0; i<n; i++){
count++;
if(v[i] == v[i+1])
break;
}
cout<<count<<"\n";
count = 0;
}
}
return 0;
}