# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
302156 | edenooo | 역사적 조사 (JOI14_historical) | C++17 | 3207 ms | 7984 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;
#define INF 1234567890
#define ll long long
const int SQ = 316, SZ = 131072;
struct Node {
int l, r, i;
bool operator<(Node &n)
{
if (l/SQ != n.l/SQ) return l/SQ < n.l/SQ;
return r < n.r;
}
};
int N, Q;
int A[100101], B[100101];
ll res[100101], seg[270000];
vector<Node> q;
priority_queue<ll> pq, del;
vector<int> com;
void Update(int n, int val) // 0-based
{
n += SZ; seg[n] += val;
for(n>>=1; n; n>>=1) seg[n] = max(seg[n<<1], seg[n<<1|1]);
}
int main()
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... |