answer.code:5:20: error: ‘int index [500003][2]’ redeclared as different kind of entity
5 | int index[500003][2];
| ^
In file included from /usr/include/string.h:432,
from /usr/include/c++/13/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:121,
from answer.code:1:
/usr/include/strings.h:61:1: note: previous declaration ‘const char* index(const char*, int)’
61 | index (const char *__s, int __c) __THROW
| ^~~~~
answer.code: In function ‘int main()’:
answer.code:15:18: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
15 | index[i][0]=0;
| ^
answer.code:16:18: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
16 | index[i][1]=0;
| ^
answer.code:22:22: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
22 | index[i][0]=0;
| ^
answer.code:23:22: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
23 | index[i][1]=index[i+1][1]+1;
| ^
answer.code:23:34: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
23 | index[i][1]=index[i+1][1]+1;
| ^
answer.code:27:22: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
27 | index[i][1]=0;
| ^
answer.code:28:22: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
28 | index[i][0]=index[i+1][0]+1;
| ^
answer.code:28:34: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
28 | index[i][0]=index[i+1][0]+1;
| ^
answer.code:53:31: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
53 | ans+=index[ans][0]+1;
| ^
answer.code:57:33: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
57 | ans += index[ans][1]+1;
| ^