답안 #391533

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
391533 2021-04-19T08:58:52 Z muhammad_hokimiyon Bubble Sort 2 (JOI18_bubblesort2) C++14
17 / 100
9000 ms 612 KB
#include "bubblesort2.h"
#include <bits/stdc++.h>

using namespace std;

vector<int> countScans(vector<int> A,vector<int> X,vector<int> V){
	int Q=X.size();
	vector<int> answer;
	int n = (int)A.size();
    for(int i = 0; i < Q; i++){
        A[X[i]] = V[i];
        int res = 0;
        for(int j = 0; j < n; j++){
            int cnt = 0;
            for(int h = 0; h < j; h++){
                cnt += (A[h] > A[j]);
            }
            res = max(res, cnt);
        }
        answer.push_back(res);
    }
    return answer;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 64 ms 204 KB Output is correct
2 Correct 219 ms 204 KB Output is correct
3 Correct 3126 ms 380 KB Output is correct
4 Correct 3115 ms 452 KB Output is correct
5 Correct 3124 ms 384 KB Output is correct
6 Correct 3088 ms 492 KB Output is correct
7 Correct 3108 ms 504 KB Output is correct
8 Correct 3114 ms 500 KB Output is correct
9 Correct 3091 ms 388 KB Output is correct
10 Correct 3100 ms 388 KB Output is correct
11 Correct 3083 ms 372 KB Output is correct
12 Correct 3076 ms 488 KB Output is correct
13 Correct 3091 ms 612 KB Output is correct
14 Correct 3080 ms 364 KB Output is correct
15 Correct 3070 ms 392 KB Output is correct
16 Correct 3072 ms 372 KB Output is correct
17 Correct 3084 ms 384 KB Output is correct
18 Correct 3065 ms 492 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 64 ms 204 KB Output is correct
2 Correct 219 ms 204 KB Output is correct
3 Correct 3126 ms 380 KB Output is correct
4 Correct 3115 ms 452 KB Output is correct
5 Correct 3124 ms 384 KB Output is correct
6 Correct 3088 ms 492 KB Output is correct
7 Correct 3108 ms 504 KB Output is correct
8 Correct 3114 ms 500 KB Output is correct
9 Correct 3091 ms 388 KB Output is correct
10 Correct 3100 ms 388 KB Output is correct
11 Correct 3083 ms 372 KB Output is correct
12 Correct 3076 ms 488 KB Output is correct
13 Correct 3091 ms 612 KB Output is correct
14 Correct 3080 ms 364 KB Output is correct
15 Correct 3070 ms 392 KB Output is correct
16 Correct 3072 ms 372 KB Output is correct
17 Correct 3084 ms 384 KB Output is correct
18 Correct 3065 ms 492 KB Output is correct
19 Execution timed out 9091 ms 604 KB Time limit exceeded
20 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 9008 ms 588 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 64 ms 204 KB Output is correct
2 Correct 219 ms 204 KB Output is correct
3 Correct 3126 ms 380 KB Output is correct
4 Correct 3115 ms 452 KB Output is correct
5 Correct 3124 ms 384 KB Output is correct
6 Correct 3088 ms 492 KB Output is correct
7 Correct 3108 ms 504 KB Output is correct
8 Correct 3114 ms 500 KB Output is correct
9 Correct 3091 ms 388 KB Output is correct
10 Correct 3100 ms 388 KB Output is correct
11 Correct 3083 ms 372 KB Output is correct
12 Correct 3076 ms 488 KB Output is correct
13 Correct 3091 ms 612 KB Output is correct
14 Correct 3080 ms 364 KB Output is correct
15 Correct 3070 ms 392 KB Output is correct
16 Correct 3072 ms 372 KB Output is correct
17 Correct 3084 ms 384 KB Output is correct
18 Correct 3065 ms 492 KB Output is correct
19 Execution timed out 9091 ms 604 KB Time limit exceeded
20 Halted 0 ms 0 KB -