catinatree.cpp:11:13: error: 'std::vector<long long int> index' redeclared as different kind of entity
11 | vector<int> index;
| ^~~~~
In file included from /usr/include/string.h:462,
from /usr/include/c++/11/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:48,
from catinatree.cpp:1:
/usr/include/strings.h:61:1: note: previous declaration 'const char* index(const char*, int)'
61 | index (const char *__s, int __c) __THROW
| ^~~~~
catinatree.cpp: In function 'long long int build_tree(long long int, long long int)':
catinatree.cpp:23:23: error: invalid types '<unresolved overloaded function type>[long long int]' for array subscript
23 | if(u==p||index[u]>=0) continue;
| ^
catinatree.cpp: In function 'long long int centroid(long long int, long long int, long long int)':
catinatree.cpp:33:23: error: invalid types '<unresolved overloaded function type>[long long int]' for array subscript
33 | if(u==p||index[u]>=0) continue;
| ^
catinatree.cpp: In function 'void decompo(long long int, long long int)':
catinatree.cpp:41:29: error: invalid types '<unresolved overloaded function type>[long long int]' for array subscript
41 | if(childC[x]==1) { index[x]=compoINDEX; mxC=max(compoINDEX,mxC); return;}
| ^
catinatree.cpp:43:10: error: invalid types '<unresolved overloaded function type>[long long int]' for array subscript
43 | index[c]=compoINDEX;
| ^
catinatree.cpp:47:17: error: invalid types '<unresolved overloaded function type>[long long int]' for array subscript
47 | if(index[u]>=0) continue;
| ^
catinatree.cpp: In function 'long long int calc(long long int, long long int, long long int, long long int)':
catinatree.cpp:56:23: error: invalid types '<unresolved overloaded function type>[long long int]' for array subscript
56 | if(u==p||index[u]<=indx) continue;
| ^
catinatree.cpp: In function 'long long int dp(long long int)':
catinatree.cpp:69:17: error: invalid types '<unresolved overloaded function type>[long long int]' for array subscript
69 | if(index[u]<=index[x]) continue;
| ^
catinatree.cpp:69:27: error: invalid types '<unresolved overloaded function type>[long long int]' for array subscript
69 | if(index[u]<=index[x]) continue;
| ^
catinatree.cpp:70:33: error: invalid types '<unresolved overloaded function type>[long long int]' for array subscript
70 | mxS=max(calc(u,x,1,index[x]),mxS);
| ^
catinatree.cpp:86:17: error: invalid types '<unresolved overloaded function type>[long long int]' for array subscript
86 | if(index[u]<=index[x]) continue;
| ^
catinatree.cpp:86:27: error: invalid types '<unresolved overloaded function type>[long long int]' for array subscript
86 | if(index[u]<=index[x]) continue;
| ^
catinatree.cpp:97:17: error: invalid types '<unresolved overloaded function type>[long long int]' for array subscript
97 | if(index[u]<=index[x]) continue;
| ^
catinatree.cpp:97:27: error: invalid types '<unresolved overloaded function type>[long long int]' for array subscript
97 | if(index[u]<=index[x]) continue;
| ^
catinatree.cpp: In function 'int main()':
catinatree.cpp:112:11: error: overloaded function with no contextual type information
112 | index.resize(n,-1); childC.resize(n); dist.resize(d+1,-1); neigh.resize(n); memo.resize(n,-1);
| ^~~~~~
catinatree.cpp:124:18: error: invalid types '<unresolved overloaded function type>[long long int]' for array subscript
124 | grp[index[i]].push_back(i);
| ^