# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
259753 | youssefbou62 | Arranging Shoes (IOI19_shoes) | C++14 | 105 ms | 19668 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>
#include "shoes.h"
#define ll long long
#define pb push_back
#define sz(x) (int)x.size()
#define all(x) x.begin(),x.end()
#define pi pair<int,int>
#define fi first
#define se second
using namespace std;
const int MAXN = 2e5+5 ;
vector<int> posR[MAXN],posL[MAXN] ;
int ft[MAXN] , n ;
int lsO(int x){
return x&(-x);
}
int sum(int x ){
if( x<=0 )return 0 ;
int s = 0;
for(int i = x; i > 0 ; i -= lsO(i) )
s += ft[i];
return s ;
}
int pref(int x){
return sum(2*n+1)-sum(x-1);
}
void update (int x ){
# | 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... |