horses.cpp: In member function 'void segtree1::init(const std::vector<double>&)':
horses.cpp:14:20: warning: conversion from 'std::vector<double>::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
14 | sz = a.size();
| ~~~~~~^~
horses.cpp:15:24: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
15 | while (sz & sz - 1) ++sz;
| ~~~^~~
horses.cpp:17:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<double>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
17 | for (int i = 0; i < a.size(); i++) st[i + sz] = a[i] + log2(y[i]), id[i + sz] = i;
| ~~^~~~~~~~~~
horses.cpp: In member function 'void segtree1::pull(int)':
horses.cpp:21:81: error: expected ';' before 'else'
21 | if (st[v << 1] >= st[v << 1 | 1]) st[v] = st[v << 1], id[v] = id[v << 1]
| ^
| ;
22 | else st[v] = st[v << 1 | 1], id[v] = id[v << 1 | 1];
| ~~~~
horses.cpp: In member function 'void segtree1::updx(int, int, int, int, int, double)':
horses.cpp:31:59: warning: declaration of 'x' shadows a global declaration [-Wshadow]
31 | void updx(int v, int l, int r, int ql, int qr, double x) {
| ~~~~~~~^
horses.cpp:6:13: note: shadowed declaration is here
6 | vector<int> x, y;
| ^
horses.cpp:38:19: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
38 | int m = l + r >> 1;
| ~~^~~
horses.cpp: In member function 'void segtree1::updy(int, int, int, int, double)':
horses.cpp:43:50: warning: declaration of 'y' shadows a global declaration [-Wshadow]
43 | void updy(int v, int l, int r, int u, double y) {
| ~~~~~~~^
horses.cpp:6:16: note: shadowed declaration is here
6 | vector<int> x, y;
| ^
horses.cpp:49:19: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
49 | int m = l + r >> 1;
| ~~^~~
horses.cpp: In member function 'void segtree1::updx(int, int, double)':
horses.cpp:54:36: warning: declaration of 'x' shadows a global declaration [-Wshadow]
54 | void updx(int l, int r, double x) {
| ~~~~~~~^
horses.cpp:6:13: note: shadowed declaration is here
6 | vector<int> x, y;
| ^
horses.cpp: In member function 'void segtree1::updy(int, double)':
horses.cpp:57:29: warning: declaration of 'y' shadows a global declaration [-Wshadow]
57 | void updy(int u, double y) {
| ~~~~~~~^
horses.cpp:6:16: note: shadowed declaration is here
6 | vector<int> x, y;
| ^
horses.cpp: In member function 'void segtree2::init(int)':
horses.cpp:65:19: warning: declaration of 'n' shadows a global declaration [-Wshadow]
65 | void init(int n) {
| ~~~~^
horses.cpp:7:5: note: shadowed declaration is here
7 | int n;
| ^
horses.cpp: In member function 'void segtree2::upd(int, int)':
horses.cpp:69:26: warning: declaration of 'x' shadows a global declaration [-Wshadow]
69 | void upd(int id, int x) {
| ~~~~^
horses.cpp:6:13: note: shadowed declaration is here
6 | vector<int> x, y;
| ^
horses.cpp:70:88: warning: conversion from 'long long int' to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} may change value [-Wconversion]
70 | for (st[id += sz] = x; id >>= 1;) st[id] = 1LL * st[id << 1] * st[id << 1 | 1] % mod;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In member function 'int segtree2::qry(int, int)':
horses.cpp:75:46: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
75 | if (l & 1) s = 1LL * s * st[l++] % mod;
| ~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp:76:46: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
76 | if (r & 1) s = 1LL * s * st[--r] % mod;
| ~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:90:55: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
90 | return 1LL * st2.qry(0, st1.id[1]) * y[st1.id[1]] % mod;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:97:55: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
97 | return 1LL * st2.qry(0, st1.id[1]) * y[st1.id[1]] % mod;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:103:55: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
103 | return 1LL * st2.qry(0, st1.id[1]) * y[st1.id[1]] % mod;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~