Submission #150871

#TimeUsernameProblemLanguageResultExecution timeMemory
150871gs14004List of Unique Integers (FXCUP4_unique)C++17
100 / 100
2 ms504 KiB
#include "unique.h" #include <bits/stdc++.h> using namespace std; const int MAXN = 6969; int P[MAXN], S[MAXN]; std::vector<int> PickUnique(int N) { for(int i=1; i<=N; i++){ P[i] = UniqueCount(0, i - 1); S[i] = UniqueCount(i - 1, N - 1); } vector<int> A(N); for(int i=1; i<=N; i++){ if(P[i-1] < P[i] && S[i] > S[i+1]) A[i-1] = 1; } return A; }
#Verdict Execution timeMemoryGrader output
Fetching results...