ogledala.cpp: In function 'void add(double, double, double)':
ogledala.cpp:26:6: error: invalid types 'std::vector<std::pair<double, int> > [2500100][double]' for array subscript
26 | coi[x].pb({(coi[x].empty() ? 0 : coi[x].back().first) + val, pos});
| ^
ogledala.cpp:26:18: error: invalid types 'std::vector<std::pair<double, int> > [2500100][double]' for array subscript
26 | coi[x].pb({(coi[x].empty() ? 0 : coi[x].back().first) + val, pos});
| ^
ogledala.cpp:26:39: error: invalid types 'std::vector<std::pair<double, int> > [2500100][double]' for array subscript
26 | coi[x].pb({(coi[x].empty() ? 0 : coi[x].back().first) + val, pos});
| ^
ogledala.cpp: In function 'double count_val(int, int)':
ogledala.cpp:47:37: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
47 | for(auto x: used) vis[x] = coo[x] = 0;
ogledala.cpp: In function 'double tree(int, int, double)':
ogledala.cpp:53:40: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type' {aka 'double'} and 'int' to binary 'operator>>'
53 | if(d == d_sz) return (al[d - 1] + 1) >> 1;
| ~~~~~~~~~~~~~~~ ^~ ~
| | |
| | int
| __gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type {aka double}
ogledala.cpp: In function 'void proc(double)':
ogledala.cpp:72:8: error: invalid operands of types 'double' and 'int' to binary 'operator>>'
72 | mx >>= 1;
| ~~~^~~~~
ogledala.cpp:72:8: note: in evaluation of 'operator>>=(double, int)'
ogledala.cpp:73:11: error: invalid operands of types 'double' and 'int' to binary 'operator&'
73 | if(mn & 1) mn >>= 1;
| ~~ ^ ~
| | |
| | int
| double
ogledala.cpp:73:19: error: invalid operands of types 'double' and 'int' to binary 'operator>>'
73 | if(mn & 1) mn >>= 1;
| ~~~^~~~~
ogledala.cpp:73:19: note: in evaluation of 'operator>>=(double, int)'
ogledala.cpp:74:18: error: invalid operands of types 'double' and 'int' to binary 'operator>>'
74 | else mn = (mn>>1) - 1;
| ~~^~~
| | |
| | int
| double
ogledala.cpp: In function 'void solve()':
ogledala.cpp:97:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<double>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
97 | for(int i = 1; i <= al.size(); ++i){
| ~~^~~~~~~~~~~~
ogledala.cpp:100:45: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type' {aka 'double'} and 'int' to binary 'operator>>'
100 | g[i].pb(compressed(((al[i - 1] + 1) >> 1) - 1));
| ~~~~~~~~~~~~~~~ ^~ ~
| | |
| | int
| __gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type {aka double}
ogledala.cpp:101:36: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type' {aka 'double'} and 'int' to binary 'operator>>'
101 | g[i].pb(compressed(al[i - 1] >> 1));
ogledala.cpp:130:38: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
130 | for(int x: used) vis[x] = coo[x] = 0;
ogledala.cpp:139:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<double>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
139 | for(int i = 1; i <= al.size(); ++i){
| ~~^~~~~~~~~~~~
ogledala.cpp:158:16: error: invalid types 'double [100010][double]' for array subscript
158 | cout << a[b] << '\n';
| ^
ogledala.cpp:166:34: error: invalid types 'std::vector<std::pair<double, int> > [2500100][double]' for array subscript
166 | int pos = upper_bound(all(coi[sz]), pair<ll, int>{b, 0}) - coi[sz].begin();
| ^
ogledala.cpp:8:16: note: in definition of macro 'all'
8 | #define all(x) x.begin(), x.end()
| ^
ogledala.cpp:166:34: error: invalid types 'std::vector<std::pair<double, int> > [2500100][double]' for array subscript
166 | int pos = upper_bound(all(coi[sz]), pair<ll, int>{b, 0}) - coi[sz].begin();
| ^
ogledala.cpp:8:27: note: in definition of macro 'all'
8 | #define all(x) x.begin(), x.end()
| ^
ogledala.cpp:166:67: error: invalid types 'std::vector<std::pair<double, int> > [2500100][double]' for array subscript
166 | int pos = upper_bound(all(coi[sz]), pair<ll, int>{b, 0}) - coi[sz].begin();
| ^
ogledala.cpp:170:15: error: invalid types 'std::vector<std::pair<double, int> > [2500100][double]' for array subscript
170 | b -= coi[sz][pos].first;
| ^
ogledala.cpp:171:20: error: invalid types 'std::vector<std::pair<double, int> > [2500100][double]' for array subscript
171 | int pos_a = coi[sz][pos + 1].second;
| ^
ogledala.cpp: In function 'int main()':
ogledala.cpp:183:15: warning: unused variable 'aa' [-Wunused-variable]
183 | int tt = 1, aa;
| ^~