# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
234663 | LittleFlowers__ | Bubble Sort 2 (JOI18_bubblesort2) | C++17 | 9046 ms | 640 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 "bubblesort2.h"
using namespace std;
vector<int> countScans(vector<int> a,vector<int> x,vector<int> v){
vector<int> res;
for(int i=0;i<x.size();++i){
a[x[i]]=v[i];
vector<int> b=a;
for(int ans=0;;){
int has=0;
for(int j=1;j<a.size();++j){
if(b[j-1]>b[j]){
has=1;
swap(b[j-1],b[j]);
}
}
if(!has){
res.push_back(ans);
break;
} ++ans;
}
}
return res;
}
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... |