What is error in the code

#include
using namespace std;

int main() {
int t;
cin>> t;
int lead_a=0;
int lead_b=0;
int maxa,maxb;
while(t–){
int a;
int b;
cin>>a>>b;
//cout<<a<<" “<<b<<endl;
if(a>b&&a-b>lead_a){
lead_a=a-b;
}
if(b>a&&b-a>lead_b){
lead_b=b-a;
}
maxa=maxa+a;
maxb=maxb+b;
}
if(maxa>maxb){
cout<<1<<” “<<lead_a<<endl;
}
else{
cout<<2<<” "<<lead_b<<endl;
}
// your code goes here
return 0;
}
//getting same answer but codechef says error in the code

Do share also the problem.

Maybe you’re printing an unexpected linefeed somewhere or maybe it’s an integer overflow, or perhaps it’s entirely a logical error which seems to print the correct output for one test case but actually is not in case of other test cases it’s pretty hard to tell anything for sure until you include the problem too.