답안 #590619

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
590619 2022-07-06T07:36:16 Z UncoolAnon Bubble Sort 2 (JOI18_bubblesort2) C++17
17 / 100
9000 ms 552 KB
#include <bits/stdc++.h> 
#define pii pair<int,int> 
#define F first 
#define S second 
#define mp make_pair 
#define endl '\n'
using namespace std; 
const int inf=1e9,N=2e5+5,md=1e9+7; 
vector<int> countScans(vector<int> a ,vector<int> x , vector<int> v){
	vector<int> answer(x.size());
	for(int i=0;i<x.size();i++){
		a[x[i]]=v[i]; 
		int mn=1e9+1; 
		for(int j=a.size()-1;j>-1;--j){
			mn=min(mn,a[j]);
			int cur=0;  
			for(int k=0;k<j;k++)
				if(a[k]>mn)
					cur++; 
			answer[i]=max(answer[i],cur ); 
		}
	}
	return answer; 
}

Compilation message

bubblesort2.cpp: In function 'std::vector<int> countScans(std::vector<int>, std::vector<int>, std::vector<int>)':
bubblesort2.cpp:11:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 |  for(int i=0;i<x.size();i++){
      |              ~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 70 ms 288 KB Output is correct
2 Correct 173 ms 340 KB Output is correct
3 Correct 2591 ms 376 KB Output is correct
4 Correct 2666 ms 384 KB Output is correct
5 Correct 6822 ms 384 KB Output is correct
6 Correct 5075 ms 384 KB Output is correct
7 Correct 6516 ms 380 KB Output is correct
8 Correct 6675 ms 380 KB Output is correct
9 Correct 6531 ms 380 KB Output is correct
10 Correct 2535 ms 500 KB Output is correct
11 Correct 2585 ms 380 KB Output is correct
12 Correct 2547 ms 376 KB Output is correct
13 Correct 2592 ms 372 KB Output is correct
14 Correct 2490 ms 372 KB Output is correct
15 Correct 2556 ms 376 KB Output is correct
16 Correct 2538 ms 376 KB Output is correct
17 Correct 2491 ms 372 KB Output is correct
18 Correct 2492 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 70 ms 288 KB Output is correct
2 Correct 173 ms 340 KB Output is correct
3 Correct 2591 ms 376 KB Output is correct
4 Correct 2666 ms 384 KB Output is correct
5 Correct 6822 ms 384 KB Output is correct
6 Correct 5075 ms 384 KB Output is correct
7 Correct 6516 ms 380 KB Output is correct
8 Correct 6675 ms 380 KB Output is correct
9 Correct 6531 ms 380 KB Output is correct
10 Correct 2535 ms 500 KB Output is correct
11 Correct 2585 ms 380 KB Output is correct
12 Correct 2547 ms 376 KB Output is correct
13 Correct 2592 ms 372 KB Output is correct
14 Correct 2490 ms 372 KB Output is correct
15 Correct 2556 ms 376 KB Output is correct
16 Correct 2538 ms 376 KB Output is correct
17 Correct 2491 ms 372 KB Output is correct
18 Correct 2492 ms 376 KB Output is correct
19 Execution timed out 9018 ms 552 KB Time limit exceeded
20 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 9022 ms 532 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 70 ms 288 KB Output is correct
2 Correct 173 ms 340 KB Output is correct
3 Correct 2591 ms 376 KB Output is correct
4 Correct 2666 ms 384 KB Output is correct
5 Correct 6822 ms 384 KB Output is correct
6 Correct 5075 ms 384 KB Output is correct
7 Correct 6516 ms 380 KB Output is correct
8 Correct 6675 ms 380 KB Output is correct
9 Correct 6531 ms 380 KB Output is correct
10 Correct 2535 ms 500 KB Output is correct
11 Correct 2585 ms 380 KB Output is correct
12 Correct 2547 ms 376 KB Output is correct
13 Correct 2592 ms 372 KB Output is correct
14 Correct 2490 ms 372 KB Output is correct
15 Correct 2556 ms 376 KB Output is correct
16 Correct 2538 ms 376 KB Output is correct
17 Correct 2491 ms 372 KB Output is correct
18 Correct 2492 ms 376 KB Output is correct
19 Execution timed out 9018 ms 552 KB Time limit exceeded
20 Halted 0 ms 0 KB -