# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
93197 | Alexa2001 | Bulldozer (JOI17_bulldozer) | C++17 | 768 ms | 33612 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>
#define left_son (node<<1)
#define right_son ((node<<1)|1)
#define mid ((st+dr)>>1)
using namespace std;
const int Nmax = 2005;
typedef long long ll;
ll ans = 0;
int n, i, j, where[Nmax], ord[Nmax];
class SegTree
{
ll best[Nmax<<2], pref[Nmax<<2], suff[Nmax<<2], s[Nmax<<2];
public:
void update(int node, int st, int dr, int pos, int val)
{
if(st== dr)
{
best[node] = pref[node] = suff[node] = max(0, val);
s[node] = val;
return;
}
if(pos <= mid) update(left_son, st, mid, pos, val);
else update(right_son, mid+1, dr, pos, val);
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... |