foo.cc: In function 'int main()':
foo.cc:10:6: warning: unused variable 'k' [-Wunused-variable]
int k=0;
^
foo.cc: In function 'int Unique(int*, int)':
foo.cc:44:6: warning: init-statement in selection statements only available with -std=c++1z or -std=gnu++1z
if(search(a,i-k,a[i])!=-1
^~~~~~
foo.cc:45:4: error: expected ';' before 'k'
k++;
^
foo.cc:44:24: warning: value computed is not used [-Wunused-value]
if(search(a,i-k,a[i])!=-1
~~~~~~~~~~~~~~~~~~^~~~
foo.cc:46:3: error: expected primary-expression before 'else'
else
^~~~
foo.cc:46:3: error: expected ')' before 'else'
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。