# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
37770 | Talant | Divide and conquer (IZhO14_divide) | C++14 | 433 ms | 56704 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 fr first
#define sc second
#define OK puts("OK");
#define pb push_back
#define mk make_pair
using namespace std;
typedef long long ll;
const ll inf = (ll)1e18 + 7;
const ll N = (ll)1e6 + 7;
ll n;
ll x[N],g[N],d[N];
ll p[N],res[N],mx,a[N],t[N];
void build (ll v = 1,ll tl = 1,ll tr = n) {
if (tl == tr)
t[v] = a[tl];
else {
ll tm = (tl + tr) >> 1;
build (v * 2,tl,tm);
build (v * 2 + 1,tm + 1,tr);
t[v] = max(t[v * 2],t[v * 2 + 1]);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |