diff options
Diffstat (limited to 'codeforces/Tram')
| -rwxr-xr-x | codeforces/Tram/main | bin | 27800 -> 22664 bytes | |||
| -rwxr-xr-x | codeforces/Tram/main.cpp | 11 |
2 files changed, 6 insertions, 5 deletions
diff --git a/codeforces/Tram/main b/codeforces/Tram/main Binary files differindex 3c01372..efe2012 100755 --- a/codeforces/Tram/main +++ b/codeforces/Tram/main diff --git a/codeforces/Tram/main.cpp b/codeforces/Tram/main.cpp index ff917a6..9b967d3 100755 --- a/codeforces/Tram/main.cpp +++ b/codeforces/Tram/main.cpp @@ -1,4 +1,5 @@ -#include<bits/stdc++.h> +#include <bits/stdc++.h> +#include <vector> using namespace std; @@ -9,9 +10,9 @@ typedef vector<int> vi; #define INF 1000000000 -int main () { - ios_base::sync_with_stdio(false); - cin.tie(NULL); +int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int mx = 0; int n; cin >> n; @@ -23,6 +24,6 @@ int main () { int x, y; cin >> x >> y; v[i + 1] = v[i] + (y - x); - } + } cout << *max_element(v.begin(), v.end()) << '\n'; } |
