# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
401936 | ja_kingy | Pyramid Base (IOI08_pyramid_base) | C++14 | 1176 ms | 95964 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>
#include <algorithm>
using namespace std;
typedef pair<int,int> pii;
const int mxP = 4e5;
int m,n,b,p,x1[mxP],y1[mxP],x2[mxP],y2[mxP],c[mxP];
vector<pii> lft, rht;
struct range_add {
int st[1<<21], lz[1<<21];
void push(int t) {
st[t*2] += lz[t];
st[t*2+1] += lz[t];
lz[t*2] += lz[t];
lz[t*2+1] += lz[t];
lz[t] = 0;
}
void upd(int ul, int ur, int v, int t, int l, int r) {
if (ur <= l || r <= ul) return;
if (ul <= l && r <= ur) {
st[t] += v;
lz[t] += v;
return;
}
int m = l+r>>1;
push(t);
upd(ul, ur, v, t*2, l, m);
upd(ul, ur, v, t*2+1, m, r);
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... |
# | 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... |
# | 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... |