answer.code:5:20: error: ‘int index [500009][2]’ redeclared as different kind of entity
5 | int index[500009][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:17:18: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
17 | index[i][0]=0;
| ^
answer.code:18:18: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
18 | index[i][1]=0;
| ^
answer.code:24:22: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
24 | index[i][0]=0;
| ^
answer.code:25:22: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
25 | index[i][1]=index[i+1][1]+1;
| ^
answer.code:25:34: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
25 | index[i][1]=index[i+1][1]+1;
| ^
answer.code:29:22: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
29 | index[i][1]=0;
| ^
answer.code:30:22: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
30 | index[i][0]=index[i+1][0]+1;
| ^
answer.code:30:34: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
30 | index[i][0]=index[i+1][0]+1;
| ^
answer.code:55:31: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
55 | ans+=index[ans][0]+1;
| ^
answer.code:59:33: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
59 | ans += index[ans][1]+1;
| ^