#include<stdio.h>
int main()
{
    int a,b,i,max=0,n,x=0;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d%d",&a,&b);
        x-=a;
        x+=b;
        if(x>max) max=x;
    }
    printf("%d\n",max);
    return 0;
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
  • 2022-01-12
  • 2021-05-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-11
  • 2021-07-21
  • 2021-05-31
  • 2022-12-23
  • 2022-12-23
  • 2021-06-05
  • 2021-07-29
相关资源
相似解决方案