Problem "TLG"

What is the Problem in this Program?
i will run on my desktop it’s run Perfectly when i upload this same program on codechef that make error “Wrong Answer” why??

#include
using namespace std;
int main(){
long t, i;
cin>>t;
long a[t], b[t], winPlayer[t],lead[t], finalLead = 0, temp = 0;
for(i=0; i < t; i++)
{
cin>>a[i]>>b[i];
}
for(i=0;i<t;i++)
{
if(a[i]>b[i])
{
lead[i] = a[i] - b[i];
winPlayer[i] = 1;
}
else if( b[i] > a[i] ){
lead[i] = b[i] - a[i];
winPlayer[i] = 2;
}
}
finalLead = lead[0];
for( i = 1; i < t; i++){
if( finalLead < lead[i] ){
finalLead = lead[i];
temp = i;
}
}
cout<<winPlayer[temp] <<" "<<finalLead;
return 0;
}

ok, just a short comment, if you select your code and ctrl+k it, it is going to be formatted as code

yep, after checking your code thoroughly you are misunderstanding the question, definitely...
ok so it goes, like this, 
for example
first round :
player 1 : 20
player 2 : 30
second round :
player 1 : 40
player 2 : 10
so, in order to count the lead you, add score from the previous round to the current round, so
first round :
player 1 : 20
player 2 : 30
second round :
player 1 : 60 //because 40 + 20
player 2 : 40 //because 30 + 10
so, let's find out the lead, in first round, player 2 leads by 10, in second round, player 1 leads by 20, so following the rules that the one with the highest lead wins, player 1 wins in round two, with lead of 20

Please at least TRY searching the forum.