boat.cpp:10:14: error: 'int index [501]' redeclared as different kind of entity
10 | int index[501];
| ^
In file included from /usr/include/c++/9/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:48,
from boat.cpp:1:
/usr/include/string.h:477:1: note: previous declaration 'const char* index(const char*, int)'
477 | index (const char *__s, int __c) __THROW
| ^~~~~
boat.cpp: In function 'll getDP(int, int)':
boat.cpp:27:34: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
27 | ans += getDP(a-1, index[a]);
| ^
boat.cpp: In function 'int main()':
boat.cpp:47:32: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
47 | index[ycoords[i].second] = i;
| ^