# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
113758 | Diuven | Bulldozer (JOI17_bulldozer) | C++14 | 1418 ms | 48112 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;
typedef long long lint;
typedef pair<int, int> pii;
const int MAX = 2019;
int n, X[MAX], Y[MAX], V[MAX];
inline lint _max(lint a, lint b){ return a<b ? b : a; }
inline int _abs(int a){ return a<0 ? -a : a; }
int gcd(int a, int b){
if(b==0) return a;
return gcd(b,a%b);
}
class Seg_t{
struct node {
lint ls, rs, ms, su;
node operator + (const node &op) const {
node res = {0,0,0,0};
// ls, rs should not be empty.
// ms may be empty
res.ls = _max(ls, su+op.ls);
res.rs = _max(op.rs, op.su+rs);
res.ms = _max(rs+op.ls, _max(ms, op.ms));
res.su = su + op.su;
return res;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |