# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
433185 | benedict0724 | 역사적 조사 (JOI14_historical) | C++17 | 1755 ms | 9448 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>
using namespace std;
typedef long long ll;
int bucket = 316;
int n, q;
struct query
{
int s, e, i;
query() : query(0, 0, 0) {}
query(int _s, int _e, int _i) : s(_s), e(_e), i(_i) {}
bool operator < (const query &O)
{
if(s/bucket == O.s/bucket) return e < O.e;
return s/bucket < O.s/bucket;
}
};
ll X[100002], Y[100002], I[100002];
query Q[100002];
ll tree[400002];
void update(ll p, ll val)
{
for(tree[p+=n]+=val;p>1;p>>=1) tree[p>>1] = max(tree[p], tree[p^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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |