# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
876932 | resfast | Bulldozer (JOI17_bulldozer) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define islam_zymchybekov void solve()
#define ios ios::sync_with_stdio(false); cin.tie(NULL);
#define pb push_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define fr first
#define sc second
#define YES cout<<"YES"<<endl;
#define NO cout<<"NO"<<endl;
#define endl '\n'
#define nl cout<<'\n';
#define int long long
#define stg string
#define yes cout<<"Yes\n";
#define no cout<<"No\n";
typedef vector<int> vi;
typedef pair<int,int> pi;
void fopn(string name){
freopen((name+".in").c_str(),"r",stdin);
freopen((name+".out").c_str(),"w",stdout);
}
/*
talent is important,
as is the work we have to
do to achieve your goals... <Sorry, looks like I won't be able to go to the moon>©ciberpank
ok,enough quotes it's time to get to work
*/
struct V{
int x1,y1,x2,y2;
int ares(){
return (abs(x2-x1))*(abs(y2-y1));
}
};
int inter(V a,V b){
int y = max(0ll,min(a.y2,b.y2)-max(a.y1,b.y1));
int x = max(0ll,min(a.x2,b.x2)-max(a.x1,b.x1));
return x*y;
}
int binpow(int a, int n){
if(n == 0)
return 1;
if(n % 2 == 1)
return binpow(a, n - 1) * a;
else{
int b = binpow(a, n / 2);
return b * b;
}
}
string s;
int a[1000000];/
char ch[1002][1002];
int c,n,m,i,j,k,x,y,cnt=0,res=0,l=0,mx=-1000000,sum=0,nx=-1;
islam_zymchybekov{
cin>>n;
for(i=0;i<n;i++){
cin>>x>>x>>x;
mx=max(x,mx);
sum+=x;
}
cout<<max(mx,sum);
}
main(){
ios;
int T = 1;
// cin >> T;
while(T--){
solve();
}
}