# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
484768 | dynam1c | Arranging Shoes (IOI19_shoes) | C++17 | 289 ms | 32072 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>
using namespace std;
typedef long long ll;
#define endl "\n"
#define all(x) x.begin(),x.end()
struct Fenwick {
int n;
vector<int> arr;
Fenwick(int n) : n(n), arr(n+1) {}
int query(int p) {
int acc = 0;
for (; p > 0; p -= p & -p)
acc += arr[p];
return acc;
}
int query(int l, int r) {
return query(r) - query(l);
}
void update(int i, int x) {
for (i++; i <= n; i += i & -i)
arr[i] += x;
}
};
long long count_swaps(std::vector<int> s) {
int n = s.size();
map<int, set<int>> m;
# | 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... |