-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path116A.cpp
More file actions
30 lines (29 loc) · 745 Bytes
/
116A.cpp
File metadata and controls
30 lines (29 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <bits/stdc++.h>
#define FOR(i, start, end) for(int i = start; i < end; i++)
#define ROF(i, start, end) for(int i = end; i > start; i--)
#define FORO(i, end) for(int i = 0; i < end; i++)
#define ROFO(i, start) for(int i = start; i >= 0; i--)
#define pub push_back
#define fir first
#define sec second
#define pob pop_back
#define read_arr(arr, start, end) for (int i = start; i < end; i++) { cin >> arr[i]; }
#define vi vector<int>
#define vl vector<long>
#define pii pair<int, int>
using namespace std;
typedef long long LL;
typedef long double LD;
int main() {
int t;
cin >> t;
int nn = 0, mm = INT_MIN;
while (t--) {
int a, b;
cin >> a >> b;
nn -= a;
nn += b;
mm = max(mm, nn);
}
cout << mm << '\n';
}