Submission #1126168

#TimeUsernameProblemLanguageResultExecution timeMemory
1126168WH8List of Unique Integers (FXCUP4_unique)C++20
100 / 100
1 ms588 KiB
#include <bits/stdc++.h> #include "unique.h" using namespace std; vector<int> PickUnique(int N) { vector<int> v(N, 1); int prv = 0; for (int i = 0; i < N; i++){ int cur = UniqueCount(0, i); if (cur <= prv){ v[i] = 0; } prv = cur; } prv = 0; for (int i = N-1; i >=0; i--){ int cur = UniqueCount(i, N-1); if (cur <= prv){ v[i] = 0; } prv = cur; } //for (auto it : v) cout << it << endl; return v; }
#Verdict Execution timeMemoryGrader output
Fetching results...