# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
858101 | edogawa_something | Bubble Sort 2 (JOI18_bubblesort2) | C++17 | 33 ms | 688 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 "bubblesort2.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vii;
typedef pair<ll,ll> pii;
#define F first
#define S second
#define all(v) v.begin(),v.end()
#define pb push_back
const ll M=5e5+10;
const ll inf=2e18;
vector<int>countScans(vector<int> a,vector<int> x,vector<int> v){
vector<int> ans;
for(int i=0;i<x.size();i++){
a[x[i]]=v[i];
ll m=inf;
ll res=0;
for(int j=a.size()-1;j>=0;j--){
if(ll(a[j])>m)
res++;
m=min(m,ll(a[j]));
}
ans.pb(res);
}
return ans;
}
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... |