Submission #150219

# Submission time Handle Problem Language Result Execution time Memory
150219 2019-09-01T07:55:32 Z ----MIT합격선----(#3601, maruii, Diuven, andy627) On the Grid (FXCUP4_grid) C++17
0 / 100
5 ms 256 KB
#include "grid.h"
#include <algorithm>
using namespace std;

std::vector<int> SortDisks(int n) {
	vector<int> ans, tmp;
	for(int i=0; i<n; i++) ans.push_back(i+1);

	for(int i=0; i<n; i++) for(int j=i+1; j<n; j++){
		tmp.push_back(i), tmp.push_back(j);
		for(int k=0; k<n; k++) if(k!=i && k!=j) tmp.push_back(k);
		int x = PutDisks(tmp);
		swap(tmp[0], tmp[1]);
		int y = PutDisks(tmp);
		tmp.clear();

		if(x>y) swap(ans[i],ans[j]);
	}

	return ans;
}
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Incorrect 5 ms 256 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Incorrect 5 ms 256 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Incorrect 5 ms 256 KB Output isn't correct
3 Halted 0 ms 0 KB -