# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
953914 | amirhoseinfar1385 | Two Currencies (JOI23_currencies) | C++17 | 842 ms | 47828 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;
const int maxn=100000+10,lg=18;
struct qu{
int u,v,y,uv;
long long x;
}allq[maxn];
int n,m,q,lca[lg][maxn],timea,kaf=(1<<18),high[maxn],low[maxn],mid[maxn],check[maxn],len[maxn],res[maxn];
vector<int>adj[maxn];
vector<pair<int,int>>allc;
pair<int,int>stf[maxn],heye[maxn];
struct segment{
long long seg[(1<<19)];
void clear(){
for(int i=0;i<(1<<19);i++){
seg[i]=0;
}
}
void upd(int i,int l,int r,int tl,int tr,int w){
if(l>r||l>tr||r<tl||tl>tr){
return ;
}
if(l>=tl&&r<=tr){
seg[i]+=w;
return ;
}
int m=(l+r)>>1;
upd((i<<1),l,m,tl,tr,w);
upd((i<<1)^1,m+1,r,tl,tr,w);
# | 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... |