| # | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1035257 | GasmaskChan | Fortune Telling 2 (JOI14_fortune_telling2) | C++17 | 336 ms | 54708 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 int long long
#define MAX 200001
int a[MAX], b[MAX], q[MAX];
struct Seg
{
int n;
vector<int> ST;
Seg(int _n) : n(_n)
{
ST.assign(1 << (__lg(_n) + 2), -1);
}
void update(int pos, int val)
{
int mid, id = 1, l = 1, r = n;
while (l < r)
{
mid = (l + r) >> 1;
if (pos > mid) id = id << 1 | 1, l = mid + 1;
else id <<= 1, r = mid;
}
ST[id] = val;
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
