# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
418593 | gromperen | Arranging Shoes (IOI19_shoes) | C++17 | 67 ms | 12176 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 ll = long long;
using namespace std;
const int MAXN = 2e5+5;
int n;
//vector<vector<pair<int,int>>> v(MAXN, vector<pair<int,int>>);
struct fenwick {
int tree[MAXN];
void update(int i, ll v) {
for (; i <= n; i += (i & -i)) tree[i] += v;
}
ll query(int i) {
ll s = 0;
for (; i > 0; i -= (i & -i)) s += tree[i];
return s;
}
} fen;
long long count_swaps(std::vector<int> s) {
n = (int)s.size() / 2;
ll ans = 0;
vector<pair<int,int>>v;
vector<pair<int,int>> ord[MAXN];
# | 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... |