#include "bubblesort2.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n, q;
vector<pair<int, int> > vec;
int arr[500002];
vector<int> ans;
vector<int> countScans(vector<int> A, vector<int> X, vector<int> V){
n = (int)A.size();
q = (int)X.size();
for(int i=1; i<=n; i++){
arr[i] = A[i-1];
}
for(int i=0; i<q; i++){
arr[X[i]+1] = V[i];
int tmp = n, ret = n-1;
for(int i=n-1; i>=1; i--){
if(arr[tmp] >= arr[i]) tmp = i, ret--;
}
ans.push_back(ret);
}
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
66 ms |
756 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |