| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1242587 | iyedoo | Arranging Shoes (IOI19_shoes) | C++20 | 15 ms | 1968 KiB |
#include "shoes.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mn = LLONG_MAX;
ll count_swaps(vector<int> s) {
ll n = s.size();
ll spot = 0;
ll ans = 0;
for (int i = 0; i < n; ++i) {
if (s[i] < 0) {
// cout << i << " " << spot << "\n";
ans += abs(i - spot);
spot += 2;
}
}
return ans;
}| # | 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... | ||||
