Submission #284021

# Submission time Handle Problem Language Result Execution time Memory
284021 2020-08-26T13:20:13 Z AMnu Bubble Sort 2 (JOI18_bubblesort2) C++14
38 / 100
9000 ms 1792 KB
#include "bubblesort2.h"
#include <bits/stdc++.h>
#define pii pair<int,int>
#define i1 first
#define i2 second
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> H(Q);
	vector<pii> S(N);
	
	for (int i=0;i<Q;i++) {
		A[X[i]]=V[i];
		
		for (int j=0;j<N;j++) {
			S[j]={A[j],j};
		}
		
		sort(S.begin(),S.end());
		
		for (int j=0;j<N;j++) {
			H[i]=max(H[i],S[j].i2-j);
		}
	}
	
	return H;
}
# Verdict Execution time Memory Grader output
1 Correct 15 ms 384 KB Output is correct
2 Correct 37 ms 512 KB Output is correct
3 Correct 229 ms 384 KB Output is correct
4 Correct 229 ms 504 KB Output is correct
5 Correct 218 ms 384 KB Output is correct
6 Correct 142 ms 384 KB Output is correct
7 Correct 185 ms 504 KB Output is correct
8 Correct 202 ms 432 KB Output is correct
9 Correct 217 ms 384 KB Output is correct
10 Correct 136 ms 504 KB Output is correct
11 Correct 131 ms 384 KB Output is correct
12 Correct 131 ms 384 KB Output is correct
13 Correct 129 ms 384 KB Output is correct
14 Correct 128 ms 384 KB Output is correct
15 Correct 135 ms 428 KB Output is correct
16 Correct 116 ms 384 KB Output is correct
17 Correct 118 ms 384 KB Output is correct
18 Correct 115 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 15 ms 384 KB Output is correct
2 Correct 37 ms 512 KB Output is correct
3 Correct 229 ms 384 KB Output is correct
4 Correct 229 ms 504 KB Output is correct
5 Correct 218 ms 384 KB Output is correct
6 Correct 142 ms 384 KB Output is correct
7 Correct 185 ms 504 KB Output is correct
8 Correct 202 ms 432 KB Output is correct
9 Correct 217 ms 384 KB Output is correct
10 Correct 136 ms 504 KB Output is correct
11 Correct 131 ms 384 KB Output is correct
12 Correct 131 ms 384 KB Output is correct
13 Correct 129 ms 384 KB Output is correct
14 Correct 128 ms 384 KB Output is correct
15 Correct 135 ms 428 KB Output is correct
16 Correct 116 ms 384 KB Output is correct
17 Correct 118 ms 384 KB Output is correct
18 Correct 115 ms 384 KB Output is correct
19 Correct 3390 ms 632 KB Output is correct
20 Correct 4454 ms 828 KB Output is correct
21 Correct 3728 ms 836 KB Output is correct
22 Correct 4324 ms 840 KB Output is correct
23 Correct 2566 ms 800 KB Output is correct
24 Correct 2528 ms 808 KB Output is correct
25 Correct 2537 ms 768 KB Output is correct
26 Correct 2517 ms 888 KB Output is correct
27 Correct 2486 ms 888 KB Output is correct
28 Correct 2507 ms 888 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5873 ms 768 KB Output is correct
2 Execution timed out 9069 ms 1792 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 15 ms 384 KB Output is correct
2 Correct 37 ms 512 KB Output is correct
3 Correct 229 ms 384 KB Output is correct
4 Correct 229 ms 504 KB Output is correct
5 Correct 218 ms 384 KB Output is correct
6 Correct 142 ms 384 KB Output is correct
7 Correct 185 ms 504 KB Output is correct
8 Correct 202 ms 432 KB Output is correct
9 Correct 217 ms 384 KB Output is correct
10 Correct 136 ms 504 KB Output is correct
11 Correct 131 ms 384 KB Output is correct
12 Correct 131 ms 384 KB Output is correct
13 Correct 129 ms 384 KB Output is correct
14 Correct 128 ms 384 KB Output is correct
15 Correct 135 ms 428 KB Output is correct
16 Correct 116 ms 384 KB Output is correct
17 Correct 118 ms 384 KB Output is correct
18 Correct 115 ms 384 KB Output is correct
19 Correct 3390 ms 632 KB Output is correct
20 Correct 4454 ms 828 KB Output is correct
21 Correct 3728 ms 836 KB Output is correct
22 Correct 4324 ms 840 KB Output is correct
23 Correct 2566 ms 800 KB Output is correct
24 Correct 2528 ms 808 KB Output is correct
25 Correct 2537 ms 768 KB Output is correct
26 Correct 2517 ms 888 KB Output is correct
27 Correct 2486 ms 888 KB Output is correct
28 Correct 2507 ms 888 KB Output is correct
29 Correct 5873 ms 768 KB Output is correct
30 Execution timed out 9069 ms 1792 KB Time limit exceeded
31 Halted 0 ms 0 KB -