# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
169920 | whttt | Arranging Shoes (IOI19_shoes) | C++14 | 1070 ms | 3192 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 <vector>
#include <iostream>
#include <algorithm>
#define ll long long
using namespace std;
ll count_swaps(vector<int> S){
ll sol = 0;
while(1){
if(S.size() == 0){
break;
}
for(ll i = 1;;i++){
if(S[i] == -S[0]){
sol += i;
if(S[0] < 0){
sol--;
}
S.erase(S.begin()+i);
S.erase(S.begin());
break;
}
}
}
return sol;
}
# | 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... |