horses.cpp: In function 'void combine(int, int, int)':
horses.cpp:30:44: error: invalid operands of types 'double' and 'const int' to binary 'operator%'
30 | st[v].mult = (st[l].mult * st[r].mult) % mod;
| ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~
| | |
| double const int
horses.cpp:31:48: warning: conversion from 'll' {aka 'long long int'} to 'double' may change value [-Wconversion]
31 | if(st[l].bestlogsum > st[l].logsum + st[r].bestlogsum){
| ~~~~~~^~~~~~~~~~
horses.cpp:31:14: warning: conversion from 'll' {aka 'long long int'} to 'double' may change value [-Wconversion]
31 | if(st[l].bestlogsum > st[l].logsum + st[r].bestlogsum){
| ~~~~~~^~~~~~~~~~
horses.cpp:35:49: warning: conversion from 'll' {aka 'long long int'} to 'double' may change value [-Wconversion]
35 | st[v].bestlogsum = st[l].logsum + st[r].bestlogsum;
| ~~~~~~^~~~~~~~~~
horses.cpp:35:41: warning: conversion from 'double' to 'll' {aka 'long long int'} may change value [-Wfloat-conversion]
35 | st[v].bestlogsum = st[l].logsum + st[r].bestlogsum;
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
horses.cpp:36:46: warning: conversion from 'll' {aka 'long long int'} to 'double' may change value [-Wconversion]
36 | st[v].bestmult = (st[l].mult * st[l].bestmult) % mod;
| ~~~~~~^~~~~~~~
horses.cpp:36:56: error: invalid operands of types 'double' and 'const int' to binary 'operator%'
36 | st[v].bestmult = (st[l].mult * st[l].bestmult) % mod;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~
| | |
| double const int
horses.cpp: In function 'void build(int, int, int)':
horses.cpp:43:26: warning: conversion from 'll' {aka 'long long int'} to 'double' may change value [-Wconversion]
43 | st[v].mult = x[tl];
| ~~~~^
horses.cpp:44:41: warning: conversion from 'double' to 'll' {aka 'long long int'} may change value [-Wfloat-conversion]
44 | st[v].bestlogsum = st[v].logsum + log10(y[tl]);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~
horses.cpp:45:44: warning: conversion from 'll' {aka 'long long int'} to 'double' may change value [-Wconversion]
45 | st[v].bestmult = (st[v].mult * y[tl]) % mod;
| ~~~~^
horses.cpp:45:47: error: invalid operands of types 'double' and 'const int' to binary 'operator%'
45 | st[v].bestmult = (st[v].mult * y[tl]) % mod;
| ~~~~~~~~~~~~~~~~~~~~ ^ ~~~
| | |
| double const int
horses.cpp: In function 'void update(int, int, int, int, int)':
horses.cpp:57:26: warning: conversion from 'll' {aka 'long long int'} to 'double' may change value [-Wconversion]
57 | st[v].mult = x[tl];
| ~~~~^
horses.cpp:58:41: warning: conversion from 'double' to 'll' {aka 'long long int'} may change value [-Wfloat-conversion]
58 | st[v].bestlogsum = st[v].logsum + log10(y[tl]);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~
horses.cpp:59:44: warning: conversion from 'll' {aka 'long long int'} to 'double' may change value [-Wconversion]
59 | st[v].bestmult = (st[v].mult * y[tl]) % mod;
| ~~~~^
horses.cpp:59:47: error: invalid operands of types 'double' and 'const int' to binary 'operator%'
59 | st[v].bestmult = (st[v].mult * y[tl]) % mod;
| ~~~~~~~~~~~~~~~~~~~~ ^ ~~~
| | |
| double const int
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:73:17: error: 'n' was not declared in this scope
73 | build(1, 0, n-1);
| ^
horses.cpp:74:18: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
74 | return st[1].bestmult;
| ~~~~~~^~~~~~~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:79:18: error: 'n' was not declared in this scope
79 | update(1, 0, n-1, pos, val);
| ^
horses.cpp:80:18: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
80 | return st[1].bestmult;
| ~~~~~~^~~~~~~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:85:18: error: 'n' was not declared in this scope
85 | update(1, 0, n-1, pos, val);
| ^
horses.cpp:86:18: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
86 | return st[1].bestmult;
| ~~~~~~^~~~~~~~