foo.cc: In function 'int UnionSet(int*, int, int*, int, int*)':
foo.cc:6:5: error: expected initializer before 'int'
int k=0;
^~~
foo.cc:8:16: error: 'k' was not declared in this scope
if( Search(c,k, a[i])==-1 )
^
foo.cc:8:7: error: 'Search' was not declared in this scope
if( Search(c,k, a[i])==-1 )
^~~~~~
foo.cc:8:7: note: suggested alternative: 'bsearch'
if( Search(c,k, a[i])==-1 )
^~~~~~
bsearch
foo.cc:11:16: error: 'k' was not declared in this scope
if( Search(c,k, b[i])==-1 )
^
foo.cc:11:7: error: 'Search' was not declared in this scope
if( Search(c,k, b[i])==-1 )
^~~~~~
foo.cc:11:7: note: suggested alternative: 'bsearch'
if( Search(c,k, b[i])==-1 )
^~~~~~
bsearch
foo.cc:13:9: error: 'k' was not declared in this scope
return k;
^
foo.cc:13:10: error: expected '}' at end of input
return k;
^
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。