# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
146420 | osaaateiasavtnl | Bulldozer (JOI17_bulldozer) | C++14 | 1016 ms | 66612 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 int long long
#define double long double
#define ii pair <int, int>
#define app push_back
#define all(a) a.begin(), a.end()
#define bp __builtin_popcount
#define ll long long
const int N = 2007, C = 1e9 + 7;
int n, ans = 0;
struct Point {
int x, y, c;
bool operator < (Point p) { return (y < p.y) || (y == p.y && x > p.x); }
} a[N];
namespace TREE {
struct Node {
int l, r, sum, ans;
Node (int x) {
sum = x;
l = r = ans = max(0ll, x);
}
Node () {}
};
Node merge(Node l, Node r) {
Node ans;
ans.sum = l.sum + r.sum;
ans.l = max(l.l, l.sum + r.l);
ans.r = max(r.r, r.sum + l.r);
ans.ans = max(max(l.ans, r.ans), l.r + r.l);
Compilation message (stderr)
# | 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... |