# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
919572 | manizare | Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) | C++14 | 2492 ms | 262148 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>
#pragma GCC optimize ("O3,unroll-loops")
#define pb push_back
#define F first
#define S second
#define all(a) a.begin(),a.end()
#define pii pair <int,int>
#define PII pair<pii , pii>
#define int long long
#define sz(v) (int)v.size()
#define rep(i , a , b) for(int i=a;i <= (b);i++)
#define per(i , a , b) for(int i=a;i >= (b);i--)
#define deb(x) cout <<#x << " : " << x << "\n" ;
using namespace std ;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int maxn = 1e6+ 10 , maxm = 1e6+10 , lg = 18 , inf= 1e18 , mod = 998244353 ;
int par[maxn] , l[maxn] , ans[maxn ] , a[maxn] , L[maxn] , w[maxn] , mx[4*maxn] ;int n, q ;
vector <int> vec[maxn] , qu[maxn] , up[maxn] ;
int find(int v){
if(par[v]==0)return v;
return par[v] = find(par[v]) ;
}
void mrg(int x ,int y){
if(x==y)return ;
l[y] = l[x] ;
par[x] = y ;
}
void upd(int x ,int w, int p =1 ,int l =1 , int r =n ){
int mid = (l+r)/2 ,pl = p<< 1, pr =p<<1|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... |