# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1100890 | giaminh2211 | Fortune Telling 2 (JOI14_fortune_telling2) | C++14 | 533 ms | 51348 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>
#define fi first
#define se second
#define all(x) begin(x), end(x)
using namespace std;
using ll=long long;
using pii=pair<int, int>;
const int N=2e5+13;
int qr[N];
struct Segtree{
vector<int> st[N << 2];
void build(int id, int l, int r){
if(l==r){
st[id].push_back(qr[l]);
return;
}
int mid=l+r >> 1;
build(id << 1, l, mid);
build(id << 1 | 1, mid+1, r);
st[id].resize(st[id << 1].size() + st[id << 1 | 1].size());
merge(all(st[id << 1]), all(st[id << 1 | 1]), begin(st[id]));
}
int get(int id, int l, int r, int u, int v, int x, int y){
if(l > v || r < u) return 0;
if(u<=l && r<=v){
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... |