# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1168743 | rayan_bd | Sequence (APIO23_sequence) | C++20 | 708 ms | 148368 KiB |
#include <bits/stdc++.h>
using namespace std;
const double INF = 5e18;
const int mxN = 5e5+100;
#define fi first
#define se second
#define all(v) v.begin(), v.end()
vector<int> seg[mxN*4];
vector<int> ar;
void build(int node,int start,int end){
seg[node].clear();
if(start==end){
seg[node]={ar[start]};
return;
}
int mid=start+(end-start)/2;
build(node*2+1,start,mid);
build(node*2+2,mid+1,end);
merge(all(seg[node*2+1]),all(seg[node*2+2]),back_inserter(seg[node]));
}
int qry(int node,int start,int end,int l,int r,int k){
if(start>r||end<l) return 0;
if(start>=l&&end<=r){
int pos=-1,st=0,en=seg[node].size()-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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |