# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
889069 | Lincito_31 | Arranging Shoes (IOI19_shoes) | C++14 | 1090 ms | 4372 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 <bits/stdc++.h>
#include "shoes.h"
using namespace std;
long long x=0;
long long count_swaps(vector<int> s) {
string xd="";
int tam=s.size();
for(int i=0;i<tam;i++){
if(s[i]>0){
xd=xd+"+";
}else{
xd=xd+"-";
}
}
while(xd.find('+')!=-1){
int i=0;
while(xd[i]!='-'){
i++;
}
x+=i;
xd.replace(i,1,"");
i=0;
while(xd[i]!='+'){
i++;
}
x+=i;
xd.replace(i,1,"");
}
return x;
}
Compilation message (stderr)
# | 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... |