Submission #150880

#TimeUsernameProblemLanguageResultExecution timeMemory
150880khsoo01List of Unique Integers (FXCUP4_unique)C++17
100 / 100
2 ms508 KiB
#include "unique.h" #include<bits/stdc++.h> using namespace std; int p[205], s[205]; 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> R; for(int i=1;i<=N;i++) { R.push_back(p[i] == p[i-1] + 1 && s[i] == s[i+1] + 1); } return R; }
#Verdict Execution timeMemoryGrader output
Fetching results...