/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:14:18: error: reference to 'next' is ambiguous
     scanf("%d", &next[i]);
                  ^~~~
/in/foo.cc:8:5: note: candidates are: int next [200005]
 int next[MAX], head[MAX], vst[MAX], ord[MAX], s[MAX], cc, cnt, n, ti, ans = INF;
     ^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/6/algorithm:61,
                 from /in/foo.cc:3:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
/in/foo.cc:19:61: error: reference to 'next' is ambiguous
     for (int cur = i; vst[cur] == 0 || vst[cur] == i; cur = next[cur]) {
                                                             ^~~~
/in/foo.cc:8:5: note: candidates are: int next [200005]
 int next[MAX], head[MAX], vst[MAX], ord[MAX], s[MAX], cc, cnt, n, ti, ans = INF;
     ^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/6/algorithm:61,
                 from /in/foo.cc:3:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~

信息

递交者
类型
递交
题目
P1979 信息传递
语言
C++
递交时间
2017-11-04 15:46:30
评测时间
2017-11-04 15:46:31
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes