# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
143328 | VladaMG98 | Arranging Shoes (IOI19_shoes) | C++17 | 115 ms | 19320 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"
using namespace std;
const int MAXN = 200010;
int bit[MAXN];
void upd(int pos, int val) {
while(pos < MAXN) {
bit[pos] += val;
pos += pos & -pos;
}
}
int get(int pos) {
int ret = 0;
while(pos) {
ret += bit[pos];
pos -= pos & -pos;
}
return ret;
}
bool marked[MAXN];
int arr[MAXN];
vector<int> occurences[2 * MAXN];
long long count_swaps(std::vector<int> s) {
int n = (int)s.size() / 2;
int N = 2 * n;
long long ans = 0;
int pos = 1;
# | 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... |