#include "bubblesort2.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> countScans(vector<int> a, vector<int> X, vector<int> V) {
int n = a.size();
int Q = X.size();
vector<int> finans;
for (int i = 0; i < Q; i++) {
a[X[i]] = V[i];
int ans = 0;
for (int j = 0; j < n; j++) {
for (int k = j + 1; k < n; k++) {
if (a[j] > a[k]) ans = max(ans, k - j);
}
}
finans.push_back(ans);
}
return finans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
137 ms |
304 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
137 ms |
304 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
9100 ms |
596 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
137 ms |
304 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |