prize.cpp:42:15: error: 'std::map<int, int> index' redeclared as different kind of entity
42 | map<int, int> index;
| ^~~~~
In file included from /usr/include/string.h:432,
from /usr/include/c++/10/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:48,
from prize.cpp:3:
/usr/include/strings.h:61:1: note: previous declaration 'const char* index(const char*, int)'
61 | index (const char *__s, int __c) __THROW
| ^~~~~
prize.cpp: In function 'void Inc(int, int)':
prize.cpp:45:13: error: overloaded function with no contextual type information
45 | if (!index.count(lvl)) {
| ^~~~~
prize.cpp:47:8: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
47 | index[lvl] = cntHave ++;
| ^
prize.cpp:49:10: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
49 | st[index[lvl]].Add(1, 0, n - 1, pos);
| ^
prize.cpp: In function 'int Get(int, int, int)':
prize.cpp:53:13: error: overloaded function with no contextual type information
53 | if (!index.count(lvl)) return 0;
| ^~~~~
prize.cpp:54:17: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
54 | return st[index[lvl]].Sum(1, 0, n - 1, l, r);
| ^
prize.cpp: In function 'int find_best(int)':
prize.cpp:66:7: warning: division by zero [-Wdiv-by-zero]
66 | Q /= 0;
| ~~^~~~
prize.cpp:73:23: error: unable to deduce 'auto&&' from 'index'
73 | for (auto [a, b] : index) if (a < lvl) comp += Get(a, 0, mid - 1);
| ^~~~~
prize.cpp:73:23: note: couldn't deduce template parameter 'auto'
prize.cpp:84:6: warning: division by zero [-Wdiv-by-zero]
84 | Q /= 0;
| ~~^~~~