Submission #97798

# Submission time Handle Problem Language Result Execution time Memory
97798 2019-02-18T14:18:24 Z scanhex Bubble Sort 2 (JOI18_bubblesort2) C++17
0 / 100
9000 ms 512 KB
#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;
}
# Verdict Execution time Memory 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 -
# Verdict Execution time Memory 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 -
# Verdict Execution time Memory Grader output
1 Execution timed out 9044 ms 512 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory 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 -