horses.cpp: In function 'long long int profit()':
horses.cpp:27:2: error: 'ans' was not declared in this scope; did you mean 'abs'?
27 | ans=mul*val;
| ^~~
| abs
horses.cpp:27:10: error: 'val' was not declared in this scope
27 | ans=mul*val;
| ^~~
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();
| ~~~~~~^~