horses.cpp: In member function 'void segment_tree::push(long int)':
horses.cpp:37:20: warning: declaration of 'node' shadows a member of 'segment_tree' [-Wshadow]
37 | void push(long node)
| ~~~~~^~~~
horses.cpp:14:12: note: shadowed declaration is here
14 | struct node
| ^~~~
horses.cpp:40:16: warning: comparison of integer expressions of different signedness: 'long int' and 'std::vector<segment_tree::node>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
40 | if(node<tree.size()){
| ~~~~^~~~~~~~~~~~
horses.cpp: In member function 'void segment_tree::build(std::vector<long double>)':
horses.cpp:50:29: warning: conversion from 'std::vector<long double>::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
50 | int x=((v.size())*2)-1;
| ~~~~~~~~~~~~~~^~
horses.cpp:59:23: warning: comparison of integer expressions of different signedness: 'long int' and 'std::vector<long double>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
59 | for(long i=0;i<v.size();i++){
| ~^~~~~~~~~
horses.cpp: In member function 'segment_tree::node segment_tree::get(int, int, int)':
horses.cpp:75:30: warning: declaration of 'node' shadows a member of 'segment_tree' [-Wshadow]
75 | node get(int l,int r,int node=1)
| ~~~~^~~~~~
horses.cpp:14:12: note: shadowed declaration is here
14 | struct node
| ^~~~
horses.cpp: In member function 'void segment_tree::update(int, int, long double, int)':
horses.cpp:86:47: warning: declaration of 'node' shadows a member of 'segment_tree' [-Wshadow]
86 | void update(int l,int r,long double z,int node=1)
| ~~~~^~~~~~
horses.cpp:14:12: note: shadowed declaration is here
14 | struct node
| ^~~~
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:123:17: warning: conversion from 'long int' to 'int' may change value [-Wconversion]
123 | N=st.get(0,n-1).pos;
| ~^~
horses.cpp:123:21: warning: conversion from 'long int' to 'int' may change value [-Wconversion]
123 | N=st.get(0,n-1).pos;
| ~~~~~~~~~~~~~~^~~
horses.cpp:124:17: 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]
124 | return tot[N];
| ^
horses.cpp: In function 'int updateX(int, long long int)':
horses.cpp:128:17: warning: conversion from 'long int' to 'int' may change value [-Wconversion]
128 | st.update(pos,n-1,log(val)-log(x[pos]));
| ~^~
horses.cpp:134:19: warning: conversion from 'long int' to 'int' may change value [-Wconversion]
134 | pos=st.get(0,n-1).pos;
| ~^~
horses.cpp:134:23: warning: conversion from 'long int' to 'int' may change value [-Wconversion]
134 | pos=st.get(0,n-1).pos;
| ~~~~~~~~~~~~~~^~~
horses.cpp:135:19: 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]
135 | return tot[pos];
| ^
horses.cpp: In function 'int updateY(int, long long int)':
horses.cpp:145:19: warning: conversion from 'long int' to 'int' may change value [-Wconversion]
145 | pos=st.get(0,n-1).pos;
| ~^~
horses.cpp:145:23: warning: conversion from 'long int' to 'int' may change value [-Wconversion]
145 | pos=st.get(0,n-1).pos;
| ~~~~~~~~~~~~~~^~~
horses.cpp:146:19: 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]
146 | return tot[pos];
| ^
/usr/bin/ld: /tmp/cc7KohZW.o: in function `main':
grader.c:(.text.startup+0x113): undefined reference to `updateX(int, int)'
/usr/bin/ld: grader.c:(.text.startup+0x16d): undefined reference to `updateY(int, int)'
collect2: error: ld returned 1 exit status