제출 #148687

#제출 시각아이디문제언어결과실행 시간메모리
148687ummm (#200)List of Unique Integers (FXCUP4_unique)C++17
100 / 100
6 ms512 KiB
#include "unique.h" #include <bits/stdc++.h> using namespace std; vector<int> PickUnique(int N) { vector<int> RES(N, 1); for(int i=0,last=0;i<N;++i){ int now = UniqueCount(0,i); if(now != last+1) RES[i] = 0; last = now; } for(int i=N-1,last=0;i>=0;--i){ int now = UniqueCount(i,N-1); if(now != last+1) RES[i] = 0; last = now; } return RES; }
#Verdict Execution timeMemoryGrader output
Fetching results...