/in/foo.cc:10:5: error: 'int index' redeclared as different kind of symbol
int index, cnt, s, ans;
^~~~~
In file included from /usr/include/c++/6/cstring:42:0,
from /in/foo.cc:3:
/usr/include/string.h:477:1: note: previous declaration 'const char* index(const char*, int)'
index (const char *__s, int __c) __THROW
^~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:23:21: error: address of overloaded function with no contextual type information
scanf("%d:(%d)", &index, &cnt);
^~~~~~
/in/foo.cc:26:14: error: invalid types 'std::vector<int> [1505][<unresolved overloaded function type>]' for array subscript
vec[index].push_back(s);
^
/in/foo.cc:27:12: error: cannot resolve overloaded function 'index' based on conversion to type 'int'
f[s] = index;
^~~~~