Submission #148097

# Submission time Handle Problem Language Result Execution time Memory
148097 2019-08-31T13:52:10 Z 조팍시\n123(#3740, tlwpdus, ainta, cki86201) List of Unique Integers (FXCUP4_unique) C++17
0 / 100
5 ms 256 KB
#include "unique.h"
using namespace std;


int L[210], R[210];

std::vector<int> PickUnique(int N) {
	int i;
	for (i = 1; i <= N; i++) {
		L[i] = UniqueCount(0, i - 1);
		R[i] = UniqueCount(i - 1, N - 1);
	}
	L[0] = R[N + 1] = 0;
	vector<int>Res;
	for (i = 1; i <= N; i++) {
		if (L[i] - L[i - 1] == 1 && R[i] - R[i + 1] == 1) {
			Res.push_back(i - 1);
		}
	}
	return Res;
}
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB Wrong
2 Halted 0 ms 0 KB -