TLG code error

i wonder whats wrong with this ,my submission shows error but it works fine tf !
#include<stdio.h>
int main()
{
int n;
scanf("%d",&n);
int s1[n],s2[n],result=0;
int winr;
for (int i = 0 ;i<n;i++)
{
scanf("%d %d",&s1[i],&s2[i]);
if(s1[i]-s2[i]>result||s2[i]-s1[i]>result ){
if(s1[i]>s2[i])
{
result=s1[i]-s2[i];
winr=1;
}
else if(s2[i]>s1[i])
{
result=s2[i]-s1[i];
winr=2;
}
}
}

printf("%d %d",winr,result);
return 0;

}