Submission #148389

#TimeUsernameProblemLanguageResultExecution timeMemory
148389USA1 (#200)List of Unique Integers (FXCUP4_unique)C++17
100 / 100
6 ms560 KiB
#include "unique.h" #include <bits/stdc++.h> using namespace std; const int MAXN = 210; int ps[MAXN][2]; vector<int> PickUnique(int N) { for (int i = 0; i < N; i++) { ps[i+1][0] = UniqueCount(0, i); ps[i+1][1] = UniqueCount(i, N - 1); } ps[0][0] = ps[N+1][1] = 0; vector <int> res; for (int i = 1; i <= N; i++) { if (ps[i][0] > ps[i-1][0] && ps[i][1] > ps[i+1][1]) res.push_back(1); else res.push_back(0); } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...