# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
890794 | GabrielPim | 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.
#include <bits/stdc++.h>
#include <vector>
using namespace std;
int n,in,fi,a,co=0;
vector<pair <int,int> > v,v2,v3,v4;
vector<int> s;
void bu(void)
{
//cout<<in<<" "<<v3[in].second<<"\n";
for(int i=v3[in].second;i>in;i--)
{
swap(s[i],s[i-1]);
co++;
v3[v4[i].second].second++;
}
v3[in].second=0;
return;
}
bool c(const pair<int, int>& a, const pair<int, int>& b)
{
if (a.first < b.first) return true;
else if (a.first > b.first) return false;
else return a.second < b.second;
}
bool c2(const pair<int, int>& a, const pair<int, int>& b)
{
if (a.first > b.first) return true;
else if (a.first < b.first) return false;
else return a.second < b.second;
}