regions.cpp:9:13: error: 'int index [200005]' redeclared as different kind of entity
9 | int index[MX], timer=1;
| ^
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 regions.cpp:2:
/usr/include/strings.h:61:1: note: previous declaration 'const char* index(const char*, int)'
61 | index (const char *__s, int __c) __THROW
| ^~~~~
regions.cpp: In function 'void DFS(int, int, int, int)':
regions.cpp:23:17: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
23 | else prep[index[reg]][H[v]] += cnt;
| ^
regions.cpp: In function 'int main()':
regions.cpp:38:8: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
38 | index[i] = cur++;
| ^
regions.cpp:47:20: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
47 | ans = prep[index[r1]][r2];
| ^