# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1101726 | 2024-10-16T17:23:47 Z | rayan_bd | List of Unique Integers (FXCUP4_unique) | C++17 | 1 ms | 336 KB |
#include <bits/stdc++.h> #include "unique.h" using namespace std; std::vector<int> PickUnique(int N){ vector<int> ans(N,0); for(int i=0;i<N;++i){ int lft=0,rgt=0,c_with_lft=0,c_with_rgt=0; if(i>0) lft=UniqueCount(0,i-1); if(i+1<N) rgt=UniqueCount(i+1,N); c_with_lft=UniqueCount(0,i); c_with_rgt=UniqueCount(i,N); if(lft<c_with_lft&&rgt<c_with_rgt){ ans[i]=1; } } return ans; }
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 336 KB | Wrong |
2 | Halted | 0 ms | 0 KB | - |