/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'int main()':
foo.cpp:20:6: error: reference to 'next' is ambiguous
   in[next[i] = nextInt()]++;
      ^
foo.cpp:14:8: note: candidates are: int next [200005]
 int n, next[NMax], in[NMax], Q[NMax], vis[NMax];
        ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/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:28:14: error: reference to 'next' is ambiguous
   if (!(--in[next[x]]))
              ^
foo.cpp:14:8: note: candidates are: int next [200005]
 int n, next[NMax], in[NMax], Q[NMax], vis[NMax];
        ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/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:29:13: error: reference to 'next' is ambiguous
    Q[t++] = next[x];
             ^
foo.cpp:14:8: note: candidates are: int next [200005]
 int n, next[NMax], in[NMax], Q[NMax], vis[NMax];
        ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/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:35:19: error: reference to 'next' is ambiguous
    int l = 1, j = next[i];
                   ^
foo.cpp:14:8: note: candidates are: int next [200005]
 int n, next[NMax], in[NMax], Q[NMax], vis[NMax];
        ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/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:38:9: error: reference to 'next' is ambiguous
     j = next[j];
         ^
foo.cpp:14:8: note: candidates are: int next [200005]
 int n, next[NMax], in[NMax], Q[NMax], vis[NMax];
        ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/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
     ^

信息

递交者
类型
递交
题目
P1979 信息传递
语言
C++
递交时间
2015-11-22 18:20:07
评测时间
2015-11-22 18:20:09
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes