foo.cc:14:13: error: 'int index [20]' redeclared as different kind of entity
14 | int index[20],pos=0;
| ^
In file included from /usr/include/string.h:432,
from /usr/include/c++/9/cstring:42,
from foo.cc:6:
/usr/include/strings.h:61:1: note: previous declaration 'const char* index(const char*, int)'
61 | index (const char *__s, int __c) __THROW
| ^~~~~
foo.cc: In function 'void dfs(int)':
foo.cc:29:18: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
29 | if(!vis[index[i]]) continue;
| ^
foo.cc:34:22: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
34 | if((a[j]>>index[i])&1)
| ^
foo.cc:42:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
42 | vis[index[i]]=0;
| ^
foo.cc:50:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
50 | vis[index[i]]=1;
| ^
foo.cc: In function 'int main()':
foo.cc:76:50: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
76 | if(((a[1]>>i)&1)==0&&((temp>>i)&1)) index[++pos]=i;
| ^
foo.cc:68:8: warning: unused variable 'y' [-Wunused-variable]
68 | int x,y;
| ^
foo.cc:57:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
57 | scanf("%d%d",&n,&g);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:61:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
61 | scanf("%s",c);
| ~~~~~^~~~~~~~
[Hydro](https://hydro.ac)提供评测服务