/in/foo.cc: In function 'int main()':
/in/foo.cc:143:18: error: 'n' was not declared in this scope
scanf("%d", &n);
^
/in/foo.cc:147:20: error: 'read' was not declared in this scope
int u=read(),v=read();
^
/in/foo.cc:148:15: error: 'v' was not declared in this scope
ins(u,v);
^
/in/foo.cc:152:12: error: 'read' was not declared in this scope
n=read();
^
/in/foo.cc:157:37: error: 'z' was not declared in this scope
printf("%d ",solvemax(y,z));
^
/in/foo.cc:161:27: error: 'z' was not declared in this scope
solvechange(y,z,x);
^