TLG - Editorial

#include
using namespace std;

int main() {
int round;
cin>>round;
int S1[round-1],S2[round-1];
int L[round-1];
int winner[round-1];
int n;
for(int k=0;k<round;k++)
{
cin>>S1[k]>>S2[k];
}
for(int i=0;i<round;i++)
{
if(S1[i]>S2[i])
{L[i]=S1[i]-S2[i];
winner[i]=1;
}
else
{L[i]=S2[i]-S1[i];
winner[i]=2;
}
}
for(int j=0;j<round;j++)
{
if(L[0]<=L[j])
{ L[0]=L[j];
n=j;
}

}
cout<<winner[n]<<" "<<L[0];
return 0;

}

Why Solution is showing wrong answer despite it shows correct output.??