# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1224859 | im2xtreme | Arranging Shoes (IOI19_shoes) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
using namespace std;
typedef long long int64;
int64 count_swaps(int S[], int n) {
vector<bool> used(n, false);
int64 swaps = 0;
for (int i = 0; i < n; i++) {
if (used[i]) continue;
if (S[i] < 0)