| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1290677 | lucasdmy | Arranging Shoes (IOI19_shoes) | C++20 | 17 ms | 3112 KiB |
#include "shoes.h"
#include <bits/stdc++.h>
using namespace std;
long long int count_swaps(vector<int>v){
vector<long long int>left;
for(int k=0;k<v.size();k++){
if(v[k]<0){
left.push_back(k);
}
}
long long int resp=0;
for(int k=0;k<left.size();k++){
resp+=abs(left[k]-2*k);
}
return resp;
}
/*int main(){
int n;
cin>>n;
vector<int>v(2*n);
for(int k=0;k<2*n;k++){
cin>>v[k];
}
cout<<count_swaps(v);
}*/| # | 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... | ||||
