#include<stdio.h>
void main()
{
int N,i;
int x1,x2,lead1=0,lead2=0,p1=0,p2=0,maxLead=0,aLead=0,currentMaxLead=0,isFirst=0,isSecond=0;
scanf("%d",&N);
for(i=0;i<N;i++)
{
scanf("%d%d",&x1,&x2);
lead1+=x1;
lead2+=x2;
if(lead1>lead2)
{
p1++;
aLead=x1-x2;
if(maxLead<aLead){
maxLead=aLead;
if(currentMaxLead<maxLead){
currentMaxLead=maxLead;
isFirst=1;
isSecond=0;
}
}
}
else
{
p2++;
aLead=x2-x1;
if(maxLead<aLead){
maxLead=aLead;
if(currentMaxLead<maxLead){
currentMaxLead=maxLead;
isFirst=0;
isSecond=1;
}
}
}
}
if(isFirst==1)
{
printf("1 %d",maxLead);
}
else
{
printf("2 %d",maxLead);
}
return 0;
}
what’s wrong with my program?
I keep getting NZEC error