horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:9:12: error: expected ';' before '-' token
for (int i-1; i<N; i++) V[i] = V[i-1] * X[i];
^
horses.cpp:9:17: warning: for increment expression has no effect [-Wunused-value]
for (int i-1; i<N; i++) V[i] = V[i-1] * X[i];
~^~
horses.cpp:9:19: error: expected ')' before ';' token
for (int i-1; i<N; i++) V[i] = V[i-1] * X[i];
^
horses.cpp:9:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for (int i-1; i<N; i++) V[i] = V[i-1] * X[i];
^~~
horses.cpp:9:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
for (int i-1; i<N; i++) V[i] = V[i-1] * X[i];
^
horses.cpp:9:21: error: 'i' was not declared in this scope
horses.cpp:12:11: warning: declaration of 'i' shadows a previous local [-Wshadow]
for(int i=0; i<N; i++) {
^
horses.cpp:9:21: note: shadowed declaration is here
for (int i-1; i<N; i++) V[i] = V[i-1] * X[i];
^
horses.cpp:13:28: error: expected ')' before 'Y'
mx = max (mx, V[i] Y[i]);
^
horses.cpp:6:30: warning: unused parameter 'Y' [-Wunused-parameter]
int init(int N,int X[],int Y[]){
^
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:19:19: warning: unused parameter 'pos' [-Wunused-parameter]
int updateX(int pos, int val) {
^~~
horses.cpp:19:30: warning: unused parameter 'val' [-Wunused-parameter]
int updateX(int pos, int val) {
^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:23:20: warning: unused parameter 'pos' [-Wunused-parameter]
int updateY(int pos, int val) {
^~~
horses.cpp:23:31: warning: unused parameter 'val' [-Wunused-parameter]
int updateY(int pos, int val) {
^~~