My solution(C++)
#include <iostream>using namespace std;int main(){int n=0,i=0;int count1=0,count2=0,max1=0,max2=0;int p1=0,p2=0,score1=0,score2=0;cin>>n;while(i<n){cin>>score1>>score2;p1=p1+score1;p2=p2+score2;if(p1>p2){count1=count1+(p1-p2);if((p1-p2)>max1)max1=p1-p2;}else if(p2>p1){count2=count2+(p2-p1);
Read more… (2 words)