horses.cpp: In constructor 'SegTree::SegTree(int)':
horses.cpp:38:16: warning: conversion from 'double' to 'int' may change value [-Wfloat-conversion]
38 | height = ceil(log2(size));
| ~~~~^~~~~~~~~~~~
horses.cpp: In member function 'void SegTree::update(int, int, int)':
horses.cpp:61:24: warning: conversion from 'long double' to 'double' may change value [-Wfloat-conversion]
61 | tree[pos].se_ls = log((ld) x);
| ~~~^~~~~~~~
horses.cpp:62:33: warning: conversion from 'long double' to 'double' may change value [-Wfloat-conversion]
62 | tree[pos].mx_ls = log((ld) x) + log((ld) y);
| ~~~~~~~~~~~~^~~~~~~~~~~~~
horses.cpp: In function 'int compute()':
horses.cpp:73:19: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
73 | return tree.query();
| ~~~~~~~~~~^~
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:86:28: warning: conversion from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' may change value [-Wconversion]
86 | tree.update(i, X[i], Y[i]);
| ^
horses.cpp:86:28: warning: conversion from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' may change value [-Wconversion]
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:94:27: warning: conversion from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' may change value [-Wconversion]
94 | tree.update(i, X[i], Y[i]);
| ^
horses.cpp:94:27: warning: conversion from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' may change value [-Wconversion]
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:100:27: warning: conversion from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' may change value [-Wconversion]
100 | tree.update(i, X[i], Y[i]);
| ^
horses.cpp:100:27: warning: conversion from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' may change value [-Wconversion]