답안 #150063

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
150063 2019-09-01T07:38:56 Z Ian and 2-bit memory(#3648, percywtc, nhho, ulna) On the Grid (FXCUP4_grid) C++17
0 / 100
5 ms 384 KB
#include <bits/stdc++.h>

using namespace std;

#include "grid.h"

vector<int> SortDisks(int N) {
	vector<int> ans(N), inv(N);
	set<int> left;
	for (int i = 0; i < N; i++)
		left.insert(i);
	for (int i = N - 1; i >= 0; i--) {
		vector<int> test(inv);
		auto it = left.begin();
		for (int j = 0; j <= i; j++, it++)
			test[j] = *it;
		// for (int j : test) printf("%d ", j); puts("");
		int tmp = PutDisks(test) - N;
		tmp = test[i - tmp];
		// printf("i=%d tmp=%d\n", i, tmp);
		left.erase(tmp);
		ans[tmp] = i + 1;
		inv[i] = tmp;
	}
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 316 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Incorrect 5 ms 384 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 316 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Incorrect 5 ms 384 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Halted 0 ms 0 KB -
3 Incorrect 5 ms 384 KB Output isn't correct
4 Correct 5 ms 316 KB Output is correct