# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
51792 | ainta | Bulldozer (JOI17_bulldozer) | C++17 | 611 ms | 31868 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<cstdio>
#include<algorithm>
#define SZ 2048
using namespace std;
struct point2 {
int x, y, i, j;
bool operator<(const point2 &p)const {
return (long long)y*p.x != (long long)p.y*x ? (long long)y*p.x < (long long)p.y*x : i!=p.i?i<p.i:j<p.j;
}
}P[2010000];
struct point {
int x, y, c;
bool operator<(const point &p)const {
return x != p.x ? x < p.x : y < p.y;
}
}w[2010];
long long res;
int n,cnt, Loc[2010];
struct Tree {
long long L[SZ + SZ], R[SZ + SZ], S[SZ + SZ], M[SZ + SZ];
void Put(int a, int b) {
a += SZ;
S[a] = b;
L[a] = R[a] = M[a] = max(0, b);
while (a != 1) {
a >>= 1;
S[a] = S[a + a] + S[a + a + 1];
L[a] = max(L[a + a], S[a + a] + L[a + a + 1]);
R[a] = max(R[a + a + 1], S[a + a + 1] + R[a + a]);
M[a] = max(max(M[a + a], M[a + a + 1]), R[a + a] + L[a + a + 1]);
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... |