# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1047310 | Onur_Ilgaz | Arranging Shoes (IOI19_shoes) | C++17 | 347 ms | 147676 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 "shoes.h"
#include <bits/stdc++.h>
#define int long long
using namespace std;
struct fw {
int n;
vector <int> t;
fw(int size): n(size), t(n + 1) {}
void update(int ind, int x) {
ind++;
while(ind <= n) {
t[ind] += x;
ind += ind & (-ind);
}
}
int query(int ind) {
int ans = 0;
ind++;
while(ind) {
ans += t[ind];
ind -= ind & (-ind);
}
return ans;
}
};
long long count_swaps(std::vector<int32_t> s) {
int n = s.size();
fw t(n);
# | 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... |