Submission #151140

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