horses.cpp: In function 'long long int profit()':
horses.cpp:28:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
28 | ans=ans%((long long)1e9+7);
| ^~~
| abs
horses.cpp:27:7: warning: unused variable 'longans' [-Wunused-variable]
27 | long longans=mul*max;
| ^~~~~~~
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:38:15: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
38 | return profit();
| ~~~~~~^~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:43:15: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
43 | return profit();
| ~~~~~~^~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:48:15: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
48 | return profit();
| ~~~~~~^~