Submission #148896

# Submission time Handle Problem Language Result Execution time Memory
148896 2019-09-01T05:20:19 Z 채원♡예나(#3706, rhrnald, ohjw420, chris2tg) List of Unique Integers (FXCUP4_unique) C++17
35 / 100
6 ms 512 KB
#include "unique.h"
using namespace std;
std::vector<int> PickUnique(int N) {
	vector<int> A; A.resize(N);

	for(int i=0; i<N-1; i++) {
		if(UniqueCount(i, N-1) == UniqueCount(i+1, N-1)+1) A[i]=1;
		else A[i]=0;
	}
	A[N-1]=1;
	for(int i=N-1; i>0; i--) {
		if(UniqueCount(0, i) != UniqueCount(0, i-1)+1) A[i]=0;
	}
	return A;
}
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Correct : C = 4
2 Correct 5 ms 256 KB Correct : C = 16
3 Correct 5 ms 384 KB Correct : C = 96
4 Correct 6 ms 384 KB Correct : C = 196
5 Correct 5 ms 384 KB Correct : C = 196
6 Correct 5 ms 384 KB Correct : C = 304
7 Correct 5 ms 384 KB Correct : C = 396
8 Partially correct 6 ms 384 KB Partially correct : C = 596
9 Partially correct 5 ms 512 KB Partially correct : C = 708
10 Partially correct 6 ms 512 KB Partially correct : C = 796
11 Partially correct 5 ms 512 KB Partially correct : C = 796
12 Partially correct 5 ms 384 KB Partially correct : C = 796
13 Partially correct 6 ms 512 KB Partially correct : C = 796
14 Partially correct 5 ms 512 KB Partially correct : C = 796
15 Partially correct 6 ms 384 KB Partially correct : C = 796