/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:36:2: error: reference to 'end' is ambiguous
  end = (N - 1) * 600;
  ^~~
/in/foo.cc:10:20: note: candidates are: int end
 int N, M, n, T, t, end;
                    ^~~
In file included from /usr/include/c++/6/utility:76:0,
                 from /usr/include/c++/6/algorithm:60,
                 from /in/foo.cc:3:
/usr/include/c++/6/initializer_list:99:5: note:                 template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
     end(initializer_list<_Tp> __ils) noexcept
     ^~~
/in/foo.cc:45:22: error: reference to 'end' is ambiguous
   for(int j =0; j <= end; j++) {
                      ^~~
/in/foo.cc:10:20: note: candidates are: int end
 int N, M, n, T, t, end;
                    ^~~
In file included from /usr/include/c++/6/utility:76:0,
                 from /usr/include/c++/6/algorithm:60,
                 from /in/foo.cc:3:
/usr/include/c++/6/initializer_list:99:5: note:                 template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
     end(initializer_list<_Tp> __ils) noexcept
     ^~~
/in/foo.cc:59:22: error: reference to 'end' is ambiguous
  for(int j = 0; j <= end; j++)
                      ^~~
/in/foo.cc:10:20: note: candidates are: int end
 int N, M, n, T, t, end;
                    ^~~
In file included from /usr/include/c++/6/utility:76:0,
                 from /usr/include/c++/6/algorithm:60,
                 from /in/foo.cc:3:
/usr/include/c++/6/initializer_list:99:5: note:                 template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
     end(initializer_list<_Tp> __ils) noexcept
     ^~~

信息

递交者
类型
递交
题目
P1168 公路巡逻
语言
C++
递交时间
2017-07-20 09:34:45
评测时间
2017-07-20 09:34:45
评测机
分数
0
总耗时
129ms
峰值内存
14.875 MiB