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;
vector<int> ans;
vector<int> countScans( vector<int> v, vector<int> pos, vector<int> val ){
int n = v.size();
int q = pos.size();
ans.resize( q );
for ( int l = 0; l < q; l++ ) {
v[pos[l]] = val[l];
ans[l] = 0;
for ( int i = 0; i < n; i++ ) {
for ( int j = i; j >= 0; j-- ) {
if ( v[j] > v[i] )
ans[l] = max( ans[l], i - j );
}
}
}
return ans;
}
# | 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... |