Output is not expected as expected from the sublime text or any other compiler

#include<bits/stdc++.h>
using namespace std;
#define sync ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
int main(){
sync
int t;
cin>>t;
while(t–){
int n;
cin>>n;
pair<int,int> p[n];
for(auto i=0;i<n;i++)
cin>>p[i].first>>p[i].second;
vector v(100,0);
for(int i=0;i<n;i++)
v[p[i].second-p[i].first]++;
cout<<*max_element(v.begin(),v.end())<<"\n";

}

}

@ANIKET_DALAL
Hello Aniket,
what issue u are facing?
btw ur logic is not correct

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.