제출 #151627

#제출 시각아이디문제언어결과실행 시간메모리
151627thebesList of Unique Integers (FXCUP4_unique)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef vector<int> vi; #define pb push_back vi PickUnique(int N){ vi res; for(int i=0;i<N;i++) res.pb(1); int p = 0; for(int i=0;i<N;i++){ int u = UniqueCount(0,i); if(u!=p+1) res[i]=0; p = u; } p = 0; for(int i=N-1;i>=0;i--){ int u = UniqueCount(i,N-1); if(u!=p+1) res[i]=0; p = u; } return res; }

컴파일 시 표준 에러 (stderr) 메시지

unique.cpp: In function 'vi PickUnique(int)':
unique.cpp:16:17: error: 'UniqueCount' was not declared in this scope
         int u = UniqueCount(0,i);
                 ^~~~~~~~~~~
unique.cpp:22:17: error: 'UniqueCount' was not declared in this scope
         int u = UniqueCount(i,N-1);
                 ^~~~~~~~~~~