# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
292482 | miss_robot | Arranging Shoes (IOI19_shoes) | C++14 | 348 ms | 275124 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"
#pragma GCC optimize("O3")
using namespace std;
const int N = 2e5+1, L = 262144;
int n;
int done[N], t[2*L];
deque<int> l[N], r[N];
int qry(int a){
a += L;
int r = 0;
while(a) r += t[a], a >>= 1;
return r;
}
void upd(int a, int b, int l, int r, int k){
if(l > b || r < a) return;
if(a <= l && r <= b){
t[k]++;
return;
}
upd(a, b, l, (l+r)>>1, k<<1), upd(a, b, ((l+r)>>1)+1, r, (k<<1)|1);
}
long long count_swaps(vector<int> s){
n = s.size();
# | 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... |