TLG problem

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

int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin>>n;
int score[1];
int lead[n-1];
int maxlead=0;
int win[n-1];
int j;
for(int i=0; i<n; i++){
cin>>score[0]>>score[1];
if(score[0]>score[1]){
win[i]=1;
}
else{
win[i]=2;
}
lead[i] = score[0] - score[1];
if(lead[i]<0){
lead[i]= -1*(lead[i]);
}
}
for(int i=0; i<n; i++){
if(lead[i]>maxlead){
maxlead = lead[i];
j = i;
}
}

cout<<win[j]<<" "<<maxlead;


return 0;

}

I have used this code for the TLG problem. I am also getting the right answer when I do custom input. But then also on submitting it shows “Wrong Answer”. Why? can anybody help me with this?