답안 #150151

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
150151 2019-09-01T07:48:39 Z Powered By Zigui(#3580, aaaa, evenharder, best_sheild97) On the Grid (FXCUP4_grid) C++17
12 / 100
11 ms 384 KB
#include "grid.h"
#include <bits/stdc++.h>
using namespace std;

std::vector<int> SortDisks(int N) {
	vector<int> correct;
	vector<int> ans;	ans.resize(N);
	set<int> S;
	for(int i = 0 ; i < N ; i++) S.insert(i);

	for(int i = 0 ; i < N ; i++){
		for(auto val1 : S) {
			vector<int> tmp;
			tmp.push_back(val1);
			for(auto val2 : S) if(val1 != val2) tmp.push_back(val2);
			for(int j = correct.size() - 1 ; j >= 0 ; j--) tmp.push_back(correct[j]);
			int X = PutDisks(tmp);
			//cout << X << '\n';
			if(X == 2 * N - 1 - i) {
				ans[val1] = N - i;
				correct.push_back(val1);
				S.erase(val1);
				break;
			}
		}
	}

	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 384 KB Output is correct
2 Correct 6 ms 384 KB Output is correct
3 Correct 6 ms 384 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
5 Correct 7 ms 384 KB Output is correct
6 Correct 6 ms 256 KB Output is correct
7 Correct 5 ms 384 KB Output is correct
8 Correct 6 ms 384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 384 KB Output is correct
2 Correct 6 ms 384 KB Output is correct
3 Correct 6 ms 384 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
5 Correct 7 ms 384 KB Output is correct
6 Correct 6 ms 256 KB Output is correct
7 Correct 5 ms 384 KB Output is correct
8 Correct 6 ms 384 KB Output is correct
9 Incorrect 11 ms 384 KB Output isn't correct
10 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Halted 0 ms 0 KB -
2 Incorrect 11 ms 384 KB Output isn't correct
3 Correct 6 ms 384 KB Output is correct
4 Correct 5 ms 384 KB Output is correct
5 Correct 6 ms 384 KB Output is correct
6 Correct 7 ms 384 KB Output is correct
7 Correct 6 ms 384 KB Output is correct
8 Correct 6 ms 384 KB Output is correct
9 Correct 6 ms 384 KB Output is correct
10 Correct 6 ms 256 KB Output is correct