diff --git a/CodeForces Problems/tram/116A.c b/CodeForces Problems/tram/116A.c new file mode 100644 index 0000000..2ac801c --- /dev/null +++ b/CodeForces Problems/tram/116A.c @@ -0,0 +1,21 @@ +#include +#include +int main() +{ + int n,a,b,temp=0,i,f=0; + scanf("%d",&n); + for(i=1;i<=n;i++) + { + scanf("%d%d",&a,&b); + temp=temp-a+b; + if(i==1){ + f=temp; + } + if(f<=temp) + { + f=temp; + } + printf("%d",f); + } + return 0; +} \ No newline at end of file