/ Vijos /

记录详情

Compile Error

/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
           ^~~

信息

递交者
类型
自测
题目
P1000 A+B Problem
语言
C++
递交时间
2018-10-01 14:27:34
评测时间
2018-10-01 14:27:34
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes