confusion regarding the the lead game problem. urgent

#include <stdio.h>
#include <stdlib.h>

int main()
{
int n;
scanf("%d\n",&n);
int s[n],t[n],sco[n],win[n];
int w,l;
int i;
l=0;w=0;
for(i=0;i<n;i++)
{
scanf("%d %d",&s[i],&t[i]);
if(s[i]>t[i])
{
sco[i]= s[i]-t[i];
win[i]= 1;
}
else if(t[i]>s[i])
{
sco[i]= t[i]-s[i];
win[i]= 2;

    }
}
for(i=0;i<n;i++)
{
    if(l<sco[i])
    {
        l=sco[i];
        w= win[i];
    }
}
printf("%d  %d\n",w,l);
return 0;

}
the above code is working perfectly fine in codeblocks and is giving the output as per the requirements but submissions result in a wrong answer. please help with the code.

Please give forums a search first.

//