Main.cc: In function 'void move(int)':
Main.cc:6:19: error: 'n' was not declared in this scope
for(int i=idx;i<=n;i++){
^
Main.cc:9:4: error: 'n' was not declared in this scope
a[n]=tp;
^
Main.cc: In function 'int main()':
Main.cc:12:10: warning: unused variable 'max' [-Wunused-variable]
int n,max=0,k,t;
^