답안 #391539

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

using namespace std;

const int maxn = 500500;

int t[4 * maxn];


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 = -1;
            for(int h = 0; h < n; h++){
                cnt += (A[h] <= A[j]);
            }
            res = max(res, j - cnt);
        }
        answer.push_back(res);
    }
    return answer;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 124 ms 204 KB Output is correct
2 Correct 454 ms 312 KB Output is correct
3 Correct 6242 ms 344 KB Output is correct
4 Correct 6199 ms 344 KB Output is correct
5 Correct 6405 ms 344 KB Output is correct
6 Correct 6291 ms 452 KB Output is correct
7 Correct 6125 ms 332 KB Output is correct
8 Correct 6167 ms 340 KB Output is correct
9 Correct 6124 ms 468 KB Output is correct
10 Correct 6150 ms 456 KB Output is correct
11 Correct 6273 ms 344 KB Output is correct
12 Correct 6183 ms 344 KB Output is correct
13 Correct 6411 ms 456 KB Output is correct
14 Correct 6342 ms 344 KB Output is correct
15 Correct 6410 ms 332 KB Output is correct
16 Correct 6340 ms 332 KB Output is correct
17 Correct 6227 ms 348 KB Output is correct
18 Correct 6321 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 124 ms 204 KB Output is correct
2 Correct 454 ms 312 KB Output is correct
3 Correct 6242 ms 344 KB Output is correct
4 Correct 6199 ms 344 KB Output is correct
5 Correct 6405 ms 344 KB Output is correct
6 Correct 6291 ms 452 KB Output is correct
7 Correct 6125 ms 332 KB Output is correct
8 Correct 6167 ms 340 KB Output is correct
9 Correct 6124 ms 468 KB Output is correct
10 Correct 6150 ms 456 KB Output is correct
11 Correct 6273 ms 344 KB Output is correct
12 Correct 6183 ms 344 KB Output is correct
13 Correct 6411 ms 456 KB Output is correct
14 Correct 6342 ms 344 KB Output is correct
15 Correct 6410 ms 332 KB Output is correct
16 Correct 6340 ms 332 KB Output is correct
17 Correct 6227 ms 348 KB Output is correct
18 Correct 6321 ms 340 KB Output is correct
19 Execution timed out 9038 ms 452 KB Time limit exceeded
20 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 9086 ms 460 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 124 ms 204 KB Output is correct
2 Correct 454 ms 312 KB Output is correct
3 Correct 6242 ms 344 KB Output is correct
4 Correct 6199 ms 344 KB Output is correct
5 Correct 6405 ms 344 KB Output is correct
6 Correct 6291 ms 452 KB Output is correct
7 Correct 6125 ms 332 KB Output is correct
8 Correct 6167 ms 340 KB Output is correct
9 Correct 6124 ms 468 KB Output is correct
10 Correct 6150 ms 456 KB Output is correct
11 Correct 6273 ms 344 KB Output is correct
12 Correct 6183 ms 344 KB Output is correct
13 Correct 6411 ms 456 KB Output is correct
14 Correct 6342 ms 344 KB Output is correct
15 Correct 6410 ms 332 KB Output is correct
16 Correct 6340 ms 332 KB Output is correct
17 Correct 6227 ms 348 KB Output is correct
18 Correct 6321 ms 340 KB Output is correct
19 Execution timed out 9038 ms 452 KB Time limit exceeded
20 Halted 0 ms 0 KB -