Why is my code not getting accepted for lead game

#include <stdio.h>

int main(){

int n,i;

scanf("%d",&n);

int S[n],T[n],C[n];

for(i=0;i<n;i++){

scanf("%d",&S[i]);

```
scanf("%d",&T[i]);
if(S[i]>T[i]){
C[i]=S[i]-T[i];
}
else{
C[i]=T[i]-S[i];
}
```

}

int max=C[0];

int pos=0;

for(i=0;i<n;i++){

if(C[i]>max){

max=C[i];

pos=i;

}

}

int w=0;

for(i=0;i<n;i++){

if(i==pos){

if(S[i]>T[i]){

w=1;

break;

}

else{

w=2;

break;

}

```
}
```

}

printf("%d %d",w,max);

}

Can someone please help me out with it