My issue
My code
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
int win = 0;
int maxDifence=0;
int FScore=0;
int SScore=0;
while(t--)
{
int first,second;
cin>>first >>second;
FScore+=first;
SScore+=second;
int diference= first-second;
if (diference > maxDifence)
{
maxDifence=difence;
win = 1;
}
else if(diference<0)
{
maxDifence= -diference;
win = 2;
}
if(FScore==SScore) win=0;
}
cout << win << " " << maxDifence << endl;
return 0;
}
Problem Link: TLG Problem - CodeChef