horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:12:17: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
12 | int place = i;
| ^
horses.cpp:14:15: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
14 | for(int j=i;j<N;j++){
| ^
horses.cpp:22:13: warning: declaration of 'j' shadows a previous local [-Wshadow]
22 | for(int j=0;j<=place;j++){
| ^
horses.cpp:14:13: note: shadowed declaration is here
14 | for(int j=i;j<N;j++){
| ^
horses.cpp:27:19: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
27 | return answer % (1000000007);
| ~~~~~~~^~~~~~~~~~~~~~
horses.cpp:30:31: error: a function-definition is not allowed here before '{' token
30 | int updateX(int pos, int val) {
| ^
horses.cpp:35:31: error: a function-definition is not allowed here before '{' token
35 | int updateY(int pos, int val) {
| ^
horses.cpp:38:1: error: expected '}' at end of input
38 | }
| ^
horses.cpp:5:35: note: to match this '{'
5 | int init(int N, int X[], int Y[]) {
| ^
horses.cpp:38:1: warning: control reaches end of non-void function [-Wreturn-type]
38 | }
| ^