# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
171391 | VEGAnn | Divide and conquer (IZhO14_divide) | C++14 | 83 ms | 5972 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 all(x) x.begin(),x.end()
#define sz(x) ((int)x.size())
#define PB push_back
#define MP make_pair
#define ft first
#define sd second
#define pll pair<ll, ll>
using namespace std;
typedef long long ll;
const ll OO = 1e18;
const int N = 100100;
vector<pll> vc;
vector<ll> suf;
ll ans = 0;
int n, x[N], g[N], e[N];
void calc(int l, int r){
if (l == r){
ans = max(ans, (ll)g[l]);
return;
}
int md = (l + r) >> 1;
calc(l, md);
calc(md + 1, r);
vc.clear();
ll sm = 0, en = 0;
for (int i = md; i >= l; i--) {
sm += g[i];
en += e[i];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |