Submission #148494

#TimeUsernameProblemLanguageResultExecution timeMemory
148494갓띵건 (#200)List of Unique Integers (FXCUP4_unique)C++17
Compilation error
0 ms0 KiB
#include "unique.h" #include <bits/stdc++.h> using namespace std; int c1[405],c2[405],chk[405]; vector<int> PickUnique(int n) { vector<int> v; c1[0]=1; for(int i=0;i<n;i++) c[i]=1; for(int i=1;i<n;i++){ c1[i]=UniqueCount(0,i); if(c1[i-1]+1==c1[i]) continue; chk[i]=0; } c2[n-1]=1; for(int i=n-2;i>=0;i--){ c2[i]=UniqueCount(i,n-1); if(c2[i+1]+1==c2[i]) continue; chk[i]=0; } for(int i=0;i<n;i++){ v.push_back(chk[i]); } return v; }

Compilation message (stderr)

unique.cpp: In function 'std::vector<int> PickUnique(int)':
unique.cpp:9:26: error: 'c' was not declared in this scope
     for(int i=0;i<n;i++) c[i]=1;
                          ^