| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 145384 | Eae02 | Arranging Shoes (IOI19_shoes) | C++17 | 1080 ms | 9496 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;
ll count_swaps(vector<int> s) {
list<int> sl(s.begin(), s.end());
ll swaps = 0;
for (auto it = sl.begin(); it != sl.end(); ++it) {
int v = *it;
auto b = next(it);
while (*b != -v) {
swaps++;
++b;
}
if (v > 0)
swaps++;
sl.erase(b);
}
return swaps;
}
| # | 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... | ||||
