#include<bits/stdc++.h>
#include "bubblesort2.h"
using namespace std;
std::vector<int> countScans(std::vector<int> A,std::vector<int> X,std::vector<int> V){
int Q=X.size();
int n=A.size();
std::vector<int> answer(Q);
for (int j=0;j<Q;j++) {
A[X[j]]=V[j];
for(int i=0;i<n;++i){
int kek=0;
for(int k=0;k<i;++k)if(A[k]>A[i])++kek;
answer[j]=max(answer[j],kek);
}
}
return answer;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
191 ms |
256 KB |
Output is correct |
2 |
Correct |
765 ms |
504 KB |
Output is correct |
3 |
Execution timed out |
9001 ms |
384 KB |
Time limit exceeded |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
191 ms |
256 KB |
Output is correct |
2 |
Correct |
765 ms |
504 KB |
Output is correct |
3 |
Execution timed out |
9001 ms |
384 KB |
Time limit exceeded |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
9044 ms |
512 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
191 ms |
256 KB |
Output is correct |
2 |
Correct |
765 ms |
504 KB |
Output is correct |
3 |
Execution timed out |
9001 ms |
384 KB |
Time limit exceeded |
4 |
Halted |
0 ms |
0 KB |
- |