Submission #148455

#TimeUsernameProblemLanguageResultExecution timeMemory
148455Cafe Maru (#200)List of Unique Integers (FXCUP4_unique)C++17
35 / 100
6 ms512 KiB
#include "unique.h" std::vector<int> PickUnique(int N) { std::vector<int> ret(N); for(int i=1;i<N-1;i++){ if(UniqueCount(0,i-1) < UniqueCount(0,i) && UniqueCount(i,N-1) > UniqueCount(i+1,N-1)) ret[i] = 1; } if(UniqueCount(0,N-1)>UniqueCount(1,N-1)) ret[0]=1; if(UniqueCount(0,N-1)>UniqueCount(0,N-2)) ret[N-1]=1; return ret; }
#Verdict Execution timeMemoryGrader output
Fetching results...