| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1355586 | Charizard2021 | Arranging Shoes (IOI19_shoes) | C++20 | 1095 ms | 1960 KiB |
#include "shoes.h"
#include<bits/stdc++.h>
using namespace std;
long long count_swaps(vector<int> s){
long long n = (long long)s.size()/2;
long long ans = 0;
for(int i = 0; i < n; i++){
for(int j = 2 * i; j < 2 * n; j++){
if(s[j] < 0){
ans += (j - 2 * i);
break;
}
}
for(int j = 2 * i; j < 2 * n; j++){
if(s[j] == -s[2 * i]){
ans += (j - (2 * i + 1));
break;
}
}
}
return ans;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
