# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1013624 | vjudge1 | Bubble Sort 2 (JOI18_bubblesort2) | C++17 | 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>
#define mod 1000000007LL
#define inf 1e17
#define ll long long
using namespace std;
void printvec(vector<int> vec)
{
for (auto &&e : vec)
{
cout << e << ' ';
}
cout << endl;
}
vector<int> countScans(vector<int>& a, vector<int>& x, vector<int>& v)
{
vector<int> s;
multiset<int> a_sorted;
for (int i = 0; i < a.size(); i++)
{
a_sorted.insert(a[i]);
}
for (int j = 0; j < x.size(); j++)
{
a_sorted.erase(a_sorted.find(a[x[j]]));
a_sorted.insert(v[j]);
a[x[j]] = v[j];
// for (auto& e:a_sorted) cout << e << ' ';
// cout << endl;