horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:6:5: error: 'n' was not declared in this scope
6 | n=N;
| ^
horses.cpp:8:7: error: 'x' was not declared in this scope
8 | x[i]=X[i];
| ^
horses.cpp:9:7: error: 'y' was not declared in this scope
9 | y[i]=Y[i];
| ^
horses.cpp:34:12: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
34 | return answer;
| ^~~~~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:38:5: error: 'x' was not declared in this scope
38 | x[pos]=val;
| ^
horses.cpp:39:17: error: 'n' was not declared in this scope; did you mean 'yn'?
39 | return init(n,x,y);
| ^
| yn
horses.cpp:39:21: error: 'y' was not declared in this scope; did you mean 'yn'?
39 | return init(n,x,y);
| ^
| yn
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:42:5: error: 'y' was not declared in this scope; did you mean 'yn'?
42 | y[pos]=val;
| ^
| yn
horses.cpp:43:17: error: 'n' was not declared in this scope; did you mean 'yn'?
43 | return init(n,x,y);
| ^
| yn
horses.cpp:43:19: error: 'x' was not declared in this scope
43 | return init(n,x,y);
| ^