请求撤下相应题解,并添加 Hack 数据,理由如下。
【输入】
3 3
-1 -2 -3
-1 -2 -3
-1 -2 -3
【输出】
-6
1 2 3
【Hack】
#1 by @niiick WA,输出为
0
0
#4 by @asuldb CE,报错信息:
rock.cpp: In function 'int main()':
rock.cpp:94:6: error: reference to 'end' is ambiguous
end=(f-1)*v+i;
^~~
In file included from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/string:51,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/locale_classes.h:40,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/ios_base.h:41,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ios:42,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ostream:38,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/iostream:39,
from rock.cpp:6:
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:107:37: note: candidates are: 'template<class _Tp> const _Tp* std::end(const std::valarray<_Tp>&)'
template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:106:31: note: 'template<class _Tp> _Tp* std::end(std::valarray<_Tp>&)'
template<typename _Tp> _Tp* end(valarray<_Tp>&);
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:97:5: note: 'template<class _Tp, long long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
end(_Tp (&__arr)[_Nm])
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:78:5: note: 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
end(const _Container& __cont) -> decltype(__cont.end())
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:68:5: note: 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
end(_Container& __cont) -> decltype(__cont.end())
^~~
In file included from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:36,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/string:51,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/locale_classes.h:40,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/ios_base.h:41,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ios:42,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ostream:38,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/iostream:39,
from rock.cpp:6:
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/initializer_list:99:5: note: 'template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)'
end(initializer_list<_Tp> __ils) noexcept
^~~
rock.cpp:20:19: note: 'int end'
int f,v,ans,num=1,end;
^~~
rock.cpp:97:8: error: reference to 'end' is ambiguous
dfs(r[end]);
^~~
In file included from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/string:51,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/locale_classes.h:40,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/ios_base.h:41,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ios:42,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ostream:38,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/iostream:39,
from rock.cpp:6:
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:107:37: note: candidates are: 'template<class _Tp> const _Tp* std::end(const std::valarray<_Tp>&)'
template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:106:31: note: 'template<class _Tp> _Tp* std::end(std::valarray<_Tp>&)'
template<typename _Tp> _Tp* end(valarray<_Tp>&);
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:97:5: note: 'template<class _Tp, long long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
end(_Tp (&__arr)[_Nm])
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:78:5: note: 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
end(const _Container& __cont) -> decltype(__cont.end())
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:68:5: note: 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
end(_Container& __cont) -> decltype(__cont.end())
^~~
In file included from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:36,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/string:51,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/locale_classes.h:40,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/ios_base.h:41,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ios:42,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ostream:38,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/iostream:39,
from rock.cpp:6:
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/initializer_list:99:5: note: 'template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)'
end(initializer_list<_Tp> __ils) noexcept
^~~
rock.cpp:20:19: note: 'int end'
int f,v,ans,num=1,end;
^~~
rock.cpp:98:2: error: reference to 'end' is ambiguous
end%=v;
^~~
In file included from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/string:51,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/locale_classes.h:40,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/ios_base.h:41,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ios:42,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ostream:38,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/iostream:39,
from rock.cpp:6:
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:107:37: note: candidates are: 'template<class _Tp> const _Tp* std::end(const std::valarray<_Tp>&)'
template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:106:31: note: 'template<class _Tp> _Tp* std::end(std::valarray<_Tp>&)'
template<typename _Tp> _Tp* end(valarray<_Tp>&);
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:97:5: note: 'template<class _Tp, long long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
end(_Tp (&__arr)[_Nm])
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:78:5: note: 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
end(const _Container& __cont) -> decltype(__cont.end())
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:68:5: note: 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
end(_Container& __cont) -> decltype(__cont.end())
^~~
In file included from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:36,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/string:51,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/locale_classes.h:40,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/ios_base.h:41,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ios:42,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ostream:38,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/iostream:39,
from rock.cpp:6:
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/initializer_list:99:5: note: 'template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)'
end(initializer_list<_Tp> __ils) noexcept
^~~
rock.cpp:20:19: note: 'int end'
int f,v,ans,num=1,end;
^~~
rock.cpp:99:5: error: reference to 'end' is ambiguous
if(end==0) end=v;
^~~
In file included from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/string:51,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/locale_classes.h:40,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/ios_base.h:41,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ios:42,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ostream:38,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/iostream:39,
from rock.cpp:6:
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:107:37: note: candidates are: 'template<class _Tp> const _Tp* std::end(const std::valarray<_Tp>&)'
template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:106:31: note: 'template<class _Tp> _Tp* std::end(std::valarray<_Tp>&)'
template<typename _Tp> _Tp* end(valarray<_Tp>&);
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:97:5: note: 'template<class _Tp, long long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
end(_Tp (&__arr)[_Nm])
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:78:5: note: 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
end(const _Container& __cont) -> decltype(__cont.end())
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:68:5: note: 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
end(_Container& __cont) -> decltype(__cont.end())
^~~
In file included from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:36,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/string:51,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/locale_classes.h:40,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/ios_base.h:41,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ios:42,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ostream:38,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/iostream:39,
from rock.cpp:6:
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/initializer_list:99:5: note: 'template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)'
end(initializer_list<_Tp> __ils) noexcept
^~~
rock.cpp:20:19: note: 'int end'
int f,v,ans,num=1,end;
^~~
rock.cpp:99:13: error: reference to 'end' is ambiguous
if(end==0) end=v;
^~~
In file included from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/string:51,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/locale_classes.h:40,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/ios_base.h:41,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ios:42,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ostream:38,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/iostream:39,
from rock.cpp:6:
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:107:37: note: candidates are: 'template<class _Tp> const _Tp* std::end(const std::valarray<_Tp>&)'
template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:106:31: note: 'template<class _Tp> _Tp* std::end(std::valarray<_Tp>&)'
template<typename _Tp> _Tp* end(valarray<_Tp>&);
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:97:5: note: 'template<class _Tp, long long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
end(_Tp (&__arr)[_Nm])
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:78:5: note: 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
end(const _Container& __cont) -> decltype(__cont.end())
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:68:5: note: 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
end(_Container& __cont) -> decltype(__cont.end())
^~~
In file included from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:36,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/string:51,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/locale_classes.h:40,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/ios_base.h:41,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ios:42,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ostream:38,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/iostream:39,
from rock.cpp:6:
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/initializer_list:99:5: note: 'template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)'
end(initializer_list<_Tp> __ils) noexcept
^~~
rock.cpp:20:19: note: 'int end'
int f,v,ans,num=1,end;
^~~
rock.cpp:100:8: error: reference to 'end' is ambiguous
cout<<end<<endl;
^~~
In file included from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/string:51,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/locale_classes.h:40,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/ios_base.h:41,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ios:42,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ostream:38,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/iostream:39,
from rock.cpp:6:
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:107:37: note: candidates are: 'template<class _Tp> const _Tp* std::end(const std::valarray<_Tp>&)'
template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:106:31: note: 'template<class _Tp> _Tp* std::end(std::valarray<_Tp>&)'
template<typename _Tp> _Tp* end(valarray<_Tp>&);
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:97:5: note: 'template<class _Tp, long long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
end(_Tp (&__arr)[_Nm])
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:78:5: note: 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
end(const _Container& __cont) -> decltype(__cont.end())
^~~
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:68:5: note: 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
end(_Container& __cont) -> decltype(__cont.end())
^~~
In file included from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/range_access.h:36,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/string:51,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/locale_classes.h:40,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/ios_base.h:41,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ios:42,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ostream:38,
from D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/iostream:39,
from rock.cpp:6:
D:/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/initializer_list:99:5: note: 'template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)'
end(initializer_list<_Tp> __ils) noexcept
^~~
rock.cpp:20:19: note: 'int end'
int f,v,ans,num=1,end;
^~~
#6-2 by @Drinkkk WA,输出为:
0
4 4 4
#20 by @doby WA,输出为:
0
0 0 0
#27 by @柏木由纪AKB48 WA,输出为空。
#28 by @檀黎斗·神 WA,输出为:
0
0 0 0
#31 by @Starlight_Glimmer WA,输出为:
-404232217
1 2 3
#33 by @wwyx2001 WA,输出为空。
#1 by @niiick WA
0
0
#2 by @Godのfather AC
#3 by @jackyzhu AC
#4 by @asuldb CE
#5 by @Seauy AC
#6-1 by @Drinkkk AC
#6-2 by @Drinkkk WA
0
4 4 4
#7-1 by @Tari AC
#7-2 by @Tari AC
#8 by @CR2016_2 AC
#9 by @chenlingxi AC
#10 by @烈酒诱鹿 AC
#11 by @wentian AC
#12 by @fy0123 AC
#13 by @封禁用户 ??
#14 by @Sober_Clever AC
#15 by @不存在之人 AC
#16 by @Drifting AC
#17 by @TianZ AC
#18 by @封禁用户 AC
#19 by @Harker233333333 AC
#20 by @doby WA
0
0 0 0
#21 by @crowworks695 AC
#22 by @skylee AC
#23 by @gary2005 AC
#24-1 by @ShineEternal AC
#24-2 by @ShineEternal AC
#25 by @清衡 AC
#26 by @yangshuirui AC
#27 by @柏木由纪AKB48 WA
(Empty.)
#28 by @檀黎斗·神 WA
0
0 0 0
#29 by @xun薰 AC
#30 by @Macwyw AC
#31 by @Starlight_Glimmer WA
-404232217
1 2 3
#32 by @封禁用户 AC
#33 by @wwyx2001 WA
(Empty.)