# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
463258 | JasperL | Foehn Phenomena (JOI17_foehn_phenomena) | C++14 | 1064 ms | 15248 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 <iostream>
#include <vector>
using namespace std;
typedef long long ll;
#define maxn 200005
int n,q; ll s,t;
ll st[4*maxn], la[4*maxn];
ll bt[maxn];
void inc(int i, ll val) {
for (; i <= n; i += (i&(-i))) bt[i] += val;
}
ll temp(int i) {
ll ret = 0;
for (; i; i -= (i&(-i))) ret += bt[i];
return ret;
}
ll gap(ll a, ll b) {
if (a < b) {
return (a-b) * s;
} else return (a-b) * t;
}
void push(int i, int l, int r) {
if (la[i] != 0) {
st[i] += la[i] * (ll)(r-l+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... |