horses.cpp: In function 'int mul(int, int)':
horses.cpp:13:11: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
13 | return r;
| ^
horses.cpp: In function 'void modify(int, int, int, int, int)':
horses.cpp:30:25: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
30 | g[v] = mul(g[v * 2], g[v * 2 + 1]);
| ~~~~~~~^
horses.cpp:30:39: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
30 | g[v] = mul(g[v * 2], g[v * 2 + 1]);
| ~~~~~~~~~~~^
horses.cpp: In function 'int get(int, int, int, int, int)':
horses.cpp:37:17: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
37 | return p[v];
| ~~~^
horses.cpp: In function 'int Get(int, int, int, int, int)':
horses.cpp:52:17: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
52 | return g[v];
| ~~~^
horses.cpp: In function 'int Better(int, int)':
horses.cpp:61:22: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
61 | int x = get(1, 1, n, i + 1, j);
| ^
horses.cpp: In function 'int Result(int)':
horses.cpp:67:25: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
67 | return mul(Get(1, 1, n, 1, i), b[i]);
| ^
horses.cpp:67:38: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
67 | return mul(Get(1, 1, n, 1, i), b[i]);
| ~~~^
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:81:14: warning: declaration of 'N' shadows a global declaration [-Wshadow]
81 | int init(int N, int X[], int Y[]) {
| ~~~~^
horses.cpp:6:11: note: shadowed declaration is here
6 | const int N = 5e5 + 69;
| ^
horses.cpp:87:20: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
87 | modify(1, 1, n, i, a[i]);
| ^
horses.cpp:87:29: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
87 | modify(1, 1, n, i, a[i]);
| ~~~^
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:95:17: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
95 | modify(1, 1, n, pos, a[pos]);
| ^
horses.cpp:95:30: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
95 | modify(1, 1, n, pos, a[pos]);
| ~~~~~^