# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
889472 | Lincito_31 | Arranging Shoes (IOI19_shoes) | C++14 | 0 ms | 0 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.
while(!s.empty()){
int temp=s[0];
if(temp<0){
for(int i=1;i<s.size();i++){
if(s[i]==-temp){
x+=i-1;
s.erase(s.begin()+i);
break;
}
}
s.erase(s.begin());
}else{
for(int i=1;i<s.size();i++){
if(s[i]==-temp){
x+=i;
s.erase(s.begin()+i);
break;
}
}
s.erase(s.begin());
}
}