horses.cpp: In function 'void buildp(long long int, long long int, long long int)':
horses.cpp:6:17: warning: declaration of 'n' shadows a global declaration [-Wshadow]
6 | void buildp(int n, int l, int r) {
| ^
horses.cpp:5:5: note: shadowed declaration is here
5 | int n, x[500005], y[500005], segp[4*500005], segm[4*500005], mod = 1e9+7;
| ^
horses.cpp: In function 'void buildm(long long int, long long int, long long int)':
horses.cpp:17:17: warning: declaration of 'n' shadows a global declaration [-Wshadow]
17 | void buildm(int n, int l, int r) {
| ^
horses.cpp:5:5: note: shadowed declaration is here
5 | int n, x[500005], y[500005], segp[4*500005], segm[4*500005], mod = 1e9+7;
| ^
horses.cpp: In function 'void updatep(long long int, long long int, long long int, long long int, long long int)':
horses.cpp:27:18: warning: declaration of 'n' shadows a global declaration [-Wshadow]
27 | void updatep(int n, int l, int r, int i, int v) {
| ^
horses.cpp:5:5: note: shadowed declaration is here
5 | int n, x[500005], y[500005], segp[4*500005], segm[4*500005], mod = 1e9+7;
| ^
horses.cpp: In function 'void updatem(long long int, long long int, long long int, long long int, long long int)':
horses.cpp:41:18: warning: declaration of 'n' shadows a global declaration [-Wshadow]
41 | void updatem(int n, int l, int r, int i, int v) {
| ^
horses.cpp:5:5: note: shadowed declaration is here
5 | int n, x[500005], y[500005], segp[4*500005], segm[4*500005], mod = 1e9+7;
| ^
horses.cpp: In function 'long long int queryp(long long int, long long int, long long int, long long int, long long int)':
horses.cpp:54:16: warning: declaration of 'n' shadows a global declaration [-Wshadow]
54 | int queryp(int n, int l, int r, int a, int b) {
| ^
horses.cpp:5:5: note: shadowed declaration is here
5 | int n, x[500005], y[500005], segp[4*500005], segm[4*500005], mod = 1e9+7;
| ^
horses.cpp: In function 'long long int querym(long long int, long long int, long long int, long long int, long long int)':
horses.cpp:64:16: warning: declaration of 'n' shadows a global declaration [-Wshadow]
64 | int querym(int n, int l, int r, int a, int b) {
| ^
horses.cpp:5:5: note: shadowed declaration is here
5 | int n, x[500005], y[500005], segp[4*500005], segm[4*500005], mod = 1e9+7;
| ^
horses.cpp: In function 'int32_t calc()':
horses.cpp:103:47: warning: conversion from 'long long int' to 'int32_t' {aka 'int'} may change value [-Wconversion]
103 | return (queryp(1, 0, n-1, 0, ind)*y[ind]) % mod;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp:85:31: warning: unused variable 'b' [-Wunused-variable]
85 | long double v = 0, a = 0, b = 0;
| ^