PRACTICE > EASY > THE LEAD GAME

easy
game
lead
practice
the

#1

Can someone please point out the error with my code?

#include<stdio.h>

int main ()
{ int i,max=0,win,flag=0;
long int n;

scanf("%ld",&n);

int p1[n],p2[n];

if(n<=10000)
{
for(i=0;i<n;i++)
{
scanf("%d %d",&p1*,&p2*);
}

    for(i=0;i<n;i++)
    {
        if(p1*>p2*&&(p1*-p2*)>max)
        {
            max=p1*-p2*;
            win=1;
        }

        if(p2*>p1*&&(p2*-p1*)>max)
        {
            max=p2*-p1*;
            win=2;
        }

    }

    printf("%d %d",win,max);
       }


 return 0;

}


#2

@devesh_xennom you are not adding the score after each round plz… again read the table given in question carefully and u wil get it…