Submission #00110
ソースコード
ステータス
コンパイルメッセージ
./Main.cpp: 関数 ‘int dfs(int, int)’ 内:
./Main.cpp:19:6: エラー: reference to ‘next’ is ambiguous
if(next[now].size() == 0)return cost;
^~~~
./Main.cpp:13:12: 備考: 候補: std::vector<int> next [1000005]
vector<int>next[1000005];
^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_algobase.h:66:0,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/char_traits.h:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:40,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/istream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/sstream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/complex:45,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ccomplex:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_iterator_base_funcs.h:208:5: 備考: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
./Main.cpp:21:22: エラー: reference to ‘next’ is ambiguous
for(int i = 0; i < next[now].size(); i++){
^~~~
./Main.cpp:13:12: 備考: 候補: std::vector<int> next [1000005]
vector<int>next[1000005];
^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_algobase.h:66:0,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/char_traits.h:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:40,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/istream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/sstream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/complex:45,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ccomplex:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_iterator_base_funcs.h:208:5: 備考: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
./Main.cpp:22:14: エラー: reference to ‘next’ is ambiguous
int nn = next[now][i];
^~~~
./Main.cpp:13:12: 備考: 候補: std::vector<int> next [1000005]
vector<int>next[1000005];
^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_algobase.h:66:0,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/char_traits.h:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:40,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/istream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/sstream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/complex:45,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ccomplex:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_iterator_base_funcs.h:208:5: 備考: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
./Main.cpp: 関数 ‘int main()’ 内:
./Main.cpp:55:7: エラー: reference to ‘next’ is ambiguous
next[a].push_back(b);
^~~~
./Main.cpp:13:12: 備考: 候補: std::vector<int> next [1000005]
vector<int>next[1000005];
^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_algobase.h:66:0,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/char_traits.h:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:40,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/istream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/sstream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/complex:45,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ccomplex:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_iterator_base_funcs.h:208:5: 備考: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
./Main.cpp:57:7: エラー: reference to ‘next’ is ambiguous
next[b].push_back(a);
^~~~
./Main.cpp:13:12: 備考: 候補: std::vector<int> next [1000005]
vector<int>next[1000005];
^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_algobase.h:66:0,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/char_traits.h:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:40,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/istream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/sstream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/complex:45,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ccomplex:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_iterator_base_funcs.h:208:5: 備考: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
セット
テストケース