Submission #151008

#TimeUsernameProblemLanguageResultExecution timeMemory
151008joylintpList of Unique Integers (FXCUP4_unique)C++17
100 / 100
2 ms504 KiB
#include<bits/stdc++.h> #include "unique.h" using namespace std; vector<int> PickUnique(int N) { int last = 1, t; vector<int> ret(N, 1); for (int i = 1; i < N; i++) { t = UniqueCount(0, i); if (t <= last) ret[i] = 0; last = t; } last = 1; for (int i = N - 2; i >= 0; i--) { t = UniqueCount(i, N - 1); if (t <= last) ret[i] = 0; last = t; } return ret; }
#Verdict Execution timeMemoryGrader output
Fetching results...