Submission #148445

#TimeUsernameProblemLanguageResultExecution timeMemory
1484451 WA = 5 Push Up (#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,1); for(int i = 0; i < N; i++){ if(i != 0){ int v1 = UniqueCount(0, i); int v2 = UniqueCount(0, i-1); if(v1 != v2+1) ret[i] = 0; } if(i != N-1){ int v1 = UniqueCount(i, N-1); int v2 = UniqueCount(i+1, N-1); if(v1 != v2+1) ret[i] = 0; } } return ret; }
#Verdict Execution timeMemoryGrader output
Fetching results...