# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
915102 | manizare | Bubble Sort 2 (JOI18_bubblesort2) | C++14 | 2464 ms | 126840 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 ld long double
#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--)
using namespace std ;
const int maxn = 1e6 + 10 , mod = 1e9 + 7 , inf =1e9 ;
vector <int> cm ;
set <int> s[maxn] ;
int seg[4*maxn] , lz[4*maxn] , w[maxn] ;
void shi(int p , int l , int r){
int mid =(l+r)/2 , pl =p<<1 , pr = p<<1|1;
seg[pl] += lz[p] ;
seg[pr] += lz[p] ;
lz[pl] += lz[p] ;
lz[pr] += lz[p] ;
lz[p] = 0;
}
void upd(int le ,int ri , int w, int p =1 , int l = 0 , int r =sz(cm)-1){
int mid = (l+r)/2 ,pl =p<<1 ,pr =p<<1|1 ;
if(le > r || l > ri)return ;
if(le <= l && r <= ri){
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |