Submission #1133313

#TimeUsernameProblemLanguageResultExecution timeMemory
1133313asrubyList of Unique Integers (FXCUP4_unique)C++20
0 / 100
0 ms320 KiB
#include "unique.h" #include <bits/stdc++.h> using namespace std; #define iloopf(a,b) for (int i = a;i < b;i++) vector<int> PickUnique(int N) { vector<int> v(N); int l =0; int r = N-1; int u = UniqueCount(l,r); l++; bool ls = 1; while (l <= r){ if (u <= UniqueCount(l,r)){ if (ls) v[l-1] = 0; else v[r+1] = 0; }else{ if (ls) v[l-1] = 1; else v[r+1] = 1; } } return v; }
#Verdict Execution timeMemoryGrader output
Fetching results...