/in/foo.cc: In function 'int main()':
/in/foo.cc:14:9: error: invalid types 'int[int]' for array subscript
m[a[i]]=i;
^
/in/foo.cc:23:20: error: reference to 'map' is ambiguous
printf("%d",&map[x]-s[map[x]]);
^~~
/in/foo.cc:4:13: note: candidates are: std::map<int, int> map
map<int,int>map;
^~~
In file included from /usr/include/c++/6/map:61:0,
from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_map.h:96:11: note: template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map
class map
^~~
/in/foo.cc:23:29: error: reference to 'map' is ambiguous
printf("%d",&map[x]-s[map[x]]);
^~~
/in/foo.cc:4:13: note: candidates are: std::map<int, int> map
map<int,int>map;
^~~
In file included from /usr/include/c++/6/map:61:0,
from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_map.h:96:11: note: template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map
class map
^~~
/in/foo.cc:27:6: error: reference to 'map' is ambiguous
s[map[x]+1]++;
^~~
/in/foo.cc:4:13: note: candidates are: std::map<int, int> map
map<int,int>map;
^~~
In file included from /usr/include/c++/6/map:61:0,
from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_map.h:96:11: note: template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map
class map
^~~