/ Vijos /

记录详情

Compile Error

foo.cpp:14:19: error: 'int log' redeclared as different kind of symbol
 int n, m, x0, s0, log;
                   ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cmath:44:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:4:
c:\mingw\include\math.h:159:24: error: previous declaration of 'double log(double)'
 _CRTIMP double __cdecl log (double);
                        ^
foo.cpp: In function 'void init()':
foo.cpp:24:5: error: reference to 'next' is ambiguous
     next[n-1][0] = next[n-1][1] = -1;
     ^
foo.cpp:16:5: note: candidates are: int next [100010][2]
 int next[maxn][2];
     ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
foo.cpp:24:20: error: reference to 'next' is ambiguous
     next[n-1][0] = next[n-1][1] = -1;
                    ^
foo.cpp:16:5: note: candidates are: int next [100010][2]
 int next[maxn][2];
     ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
foo.cpp:26:18: error: reference to 'next' is ambiguous
     if (n > 1) { next[n-2][0] = n-1; next[n-2][1] = -1; city[h[n-2]] = n-2;}
                  ^
foo.cpp:16:5: note: candidates are: int next [100010][2]
 int next[maxn][2];
     ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
foo.cpp:26:38: error: reference to 'next' is ambiguous
     if (n > 1) { next[n-2][0] = n-1; next[n-2][1] = -1; city[h[n-2]] = n-2;}
                                      ^
foo.cpp:16:5: note: candidates are: int next [100010][2]
 int next[maxn][2];
     ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,

信息

递交者
类型
递交
题目
P1780 开车旅行
语言
C++
递交时间
2016-11-15 18:47:46
评测时间
2016-11-15 18:48:02
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes