Submission #38383
ソースコード
ステータス
コンパイルメッセージ
./Main.cpp: In function ‘void dfs(int)’:
./Main.cpp:15:3: error: reference to ‘data’ is ambiguous
data[now]/=10;
^~~~
./Main.cpp:6:7: note: candidates are: int data [300001]
int n,data[300001],flag=0,f=0;
^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/string:51:0,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/locale_classes.h:40,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/ios_base.h:41,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:42,
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/range_access.h:314:5: note: template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/range_access.h:305:5: note: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/range_access.h:296:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)
data(const _Container& __cont) -> decltype(__cont.data())
^~~~
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/range_access.h:287:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)
data(_Container& __cont) -> decltype(__cont.data())
^~~~
./Main.cpp:16:13: error: reference to ‘data’ is ambiguous
for(int i=data[now];i>=1;i--){
^~~~
./Main.cpp:6:7: note: candidates are: int data [300001]
int n,data[300001],flag=0,f=0;
^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/string:51:0,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/locale_classes.h:40,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/ios_base.h:41,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:42,
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/range_access.h:314:5: note: template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/range_access.h:305:5: note: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/range_access.h:296:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)
data(const _Container& __cont) -> decltype(__cont.data())
^~~~
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/range_access.h:287:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)
data(_Container& __cont) -> decltype(__cont.data())
^~~~
./Main.cpp: In function ‘int main()’:
./Main.cpp:33:17: error: reference to ‘data’ is ambiguous
FOR(i,n) cin>>data[i];
^~~~
./Main.cpp:6:7: note: candidates are: int data [300001]
int n,data[300001],flag=0,f=0;
^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/string:51:0,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/locale_classes.h:40,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/ios_base.h:41,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:42,
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/range_access.h:314:5: note: template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/range_access.h:305:5: note: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/range_access.h:296:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)
data(const _Container& __cont) -> decltype(__cont.data())
^~~~
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/range_access.h:287:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)
data(_Container& __cont) -> decltype(__cont.data())
^~~~
セット
テストケース