#include <stdlib.h>
int main(void) {
// your code goes here
int round,p1,p2,lead=0,winner;
scanf("%d",&round);
while(round–){
scanf("%d %d",&p1,&p2);
int score=abs(p1-p2);
Its about the cumulative scores, not the individual round scores.
You can keep a track of “cumulative diff” to correctly answer the lead for every round. Something like this
cumulative_diff = 0;
while(n--)
{
get_input(player_1); get_input(player_2);
round_lead = (player_1 - player_2 + cumulative_diff);
cumulative_diff = round_lead;
//TODO: compare round_lead to max to detect which round was the best - for player_1 or player_2
}