Submission #148646

# Submission time Handle Problem Language Result Execution time Memory
148646 2019-09-01T04:51:08 Z 이 대회 미분 되나요?(#3668, wookje, edenooo, jms100300) List of Unique Integers (FXCUP4_unique) C++17
0 / 100
5 ms 256 KB
#include "unique.h"
#include <vector>
#include <algorithm>
using namespace std;

std::vector<int> PickUnique(int N) {
	//UniqueCount(0, N-1);
	//UniqueCount(1, N-2);
	vector<int> ret(N, 0);
	int l = 1, r = UniqueCount(1, N-1);
	for (int i = 2; i < N; i++) {
		int nl = UniqueCount(0, i-1);
		int nr = UniqueCount(i, N-1);
		if (nl == l+1 && nr == r-1) {
			ret[i] = 1;
		}
	}
	return ret;
}
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Correct : C = 1
2 Incorrect 5 ms 256 KB Wrong
3 Halted 0 ms 0 KB -