/ TYWZ /

记录详情

Compile Error

/in/foo.cc: In function 'void dij()':
/in/foo.cc:30:6: error: reference to 'begin' is ambiguous
  dis[begin]=0;
      ^~~~~
/in/foo.cc:14:36: note: candidates are: int begin
 int n,m,qq,cost[110],head[110],top,begin,mlong,mcost,vis[110],dis[110],sum;
                                    ^~~~~
In file included from /usr/include/c++/6/string:51:0,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/range_access.h:87:5: note:                 template<class _Tp, long unsigned int _Nm> _Tp* std::begin(_Tp (&)[_Nm])
     begin(_Tp (&__arr)[_Nm])
     ^~~~~
/usr/include/c++/6/bits/range_access.h:58:5: note:                 template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)
     begin(const _Container& __cont) -> decltype(__cont.begin())
     ^~~~~
/usr/include/c++/6/bits/range_access.h:48:5: note:                 template<class _Container> decltype (__cont.begin()) std::begin(_Container&)
     begin(_Container& __cont) -> decltype(__cont.begin())
     ^~~~~
In file included from /usr/include/c++/6/bits/range_access.h:36:0,
                 from /usr/include/c++/6/string:51,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/initializer_list:89:5: note:                 template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
     begin(initializer_list<_Tp> __ils) noexcept
     ^~~~~
/in/foo.cc:31:21: error: reference to 'begin' is ambiguous
  q.push(make_pair(0,begin));
                     ^~~~~
/in/foo.cc:14:36: note: candidates are: int begin
 int n,m,qq,cost[110],head[110],top,begin,mlong,mcost,vis[110],dis[110],sum;
                                    ^~~~~
In file included from /usr/include/c++/6/string:51:0,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/range_access.h:87:5: note:                 template<class _Tp, long unsigned int _Nm> _Tp* std::begin(_Tp (&)[_Nm])
     begin(_Tp (&__arr)[_Nm])
     ^~~~~
/usr/include/c++/6/bits/range_access.h:58:5: note:                 template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)
     begin(const _Container& __cont) -> decltype(__cont.begin())
     ^~~~~
/usr/include/c++/6/bits/range_access.h:48:5: note:                 template<class _Container> decltype (__cont.begin()) std::begin(_Container&)
     begin(_Container& __cont) -> decltype(__cont.begin())
     ^~~~~
In file included from /usr/include/c++/6/bits/range_access.h:36:0,
                 from /usr/include/c++/6/string:51,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/initializer_list:89:5: note:                 template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
     begin(initializer_list<_Tp> __ils) noexcept
     ^~~~~
/in/foo.cc:38:32: error: reference to 'begin' is ambiguous
   if(cost[now] > mcost && now!=begin) continue;
                                ^~~~~
/in/foo.cc:14:36: note: candidates are: int begin
 int n,m,qq,cost[110],head[110],top,begin,mlong,mcost,vis[110],dis[110],sum;
                                    ^~~~~
In file included from /usr/include/c++/6/string:51:0,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/range_access.h:87:5: note:                 template<class _Tp, long unsigned int _Nm> _Tp* std::begin(_Tp (&)[_Nm])
     begin(_Tp (&__arr)[_Nm])
     ^~~~~
/usr/include/c++/6/bits/range_access.h:58:5: note:                 template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)
     begin(const _Container& __cont) -> decltype(__cont.begin())
     ^~~~~
/usr/include/c++/6/bits/range_access.h:48:5: note:                 template<class _Container> decltype (__cont.begin()) std::begin(_Container&)
     begin(_Container& __cont) -> decltype(__cont.begin())
     ^~~~~
In file included from /usr/include/c++/6/bits/range_access.h:36:0,
                 from /usr/include/c++/6/string:51,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/initializer_list:89:5: note:                 template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
     begin(initializer_list<_Tp> __ils) noexcept
     ^~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:67:19: error: reference to 'begin' is ambiguous
   scanf("%d%d%d",&begin,&mcost,&mlong);
                   ^~~~~
/in/foo.cc:14:36: note: candidates are: int begin
 int n,m,qq,cost[110],head[110],top,begin,mlong,mcost,vis[110],dis[110],sum;
                                    ^~~~~
In file included from /usr/include/c++/6/string:51:0,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/range_access.h:87:5: note:                 template<class _Tp, long unsigned int _Nm> _Tp* std::begin(_Tp (&)[_Nm])
     begin(_Tp (&__arr)[_Nm])
     ^~~~~
/usr/include/c++/6/bits/range_access.h:58:5: note:                 template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)
     begin(const _Container& __cont) -> decltype(__cont.begin())
     ^~~~~
/usr/include/c++/6/bits/range_access.h:48:5: note:                 template<class _Container> decltype (__cont.begin()) std::begin(_Container&)
     begin(_Container& __cont) -> decltype(__cont.begin())
     ^~~~~
In file included from /usr/include/c++/6/bits/range_access.h:36:0,
                 from /usr/include/c++/6/string:51,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/initializer_list:89:5: note:                 template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
     begin(initializer_list<_Tp> __ils) noexcept
     ^~~~~
/in/foo.cc:72:30: error: reference to 'begin' is ambiguous
     if(dis[i] <= mlong && i!=begin) sum++;
                              ^~~~~
/in/foo.cc:14:36: note: candidates are: int begin
 int n,m,qq,cost[110],head[110],top,begin,mlong,mcost,vis[110],dis[110],sum;
                                    ^~~~~
In file included from /usr/include/c++/6/string:51:0,
                 from /usr/include/c++/6/bi

信息

递交者
类型
递交
比赛
2019年6月15日高一(第二学期)模拟测试(九)
语言
C++
递交时间
2019-06-15 11:11:01
评测时间
2019-06-15 11:11:01
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes