portals.cpp: In function 'int main()':
portals.cpp:110:29: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if(a[i][j]!='#' && a[i-1][j]=='#' || a[i+1][j]=='#' || a[i][j-1]=='#'|| a[i][j+1]=='#')
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
portals.cpp:114:17: error: no match for 'operator=' (operand types are 'std::vector<bool>' and 'int')
used[start]=1;
^
In file included from /usr/include/c++/7/vector:65:0,
from portals.cpp:5:
/usr/include/c++/7/bits/stl_bvector.h:682:5: note: candidate: std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(const std::vector<bool, _Alloc>&) [with _Alloc = std::allocator<bool>]
operator=(const vector& __x)
^~~~~~~~
/usr/include/c++/7/bits/stl_bvector.h:682:5: note: no known conversion for argument 1 from 'int' to 'const std::vector<bool>&'
/usr/include/c++/7/bits/stl_bvector.h:713:5: note: candidate: std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(std::vector<bool, _Alloc>&&) [with _Alloc = std::allocator<bool>]
operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move())
^~~~~~~~
/usr/include/c++/7/bits/stl_bvector.h:713:5: note: no known conversion for argument 1 from 'int' to 'std::vector<bool>&&'
/usr/include/c++/7/bits/stl_bvector.h:743:5: note: candidate: std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(std::initializer_list<bool>) [with _Alloc = std::allocator<bool>]
operator=(initializer_list<bool> __l)
^~~~~~~~
/usr/include/c++/7/bits/stl_bvector.h:743:5: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<bool>'
portals.cpp:137:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<g[v].size();i++)
~^~~~~~~~~~~~
portals.cpp:140:23: error: could not convert 'used[to]' from 'std::vector<bool>' to 'bool'
if(used[to])
~~~~~~~^
portals.cpp:142:13: error: no match for 'operator=' (operand types are 'std::vector<bool>' and 'int')
used[to]=1;
^
In file included from /usr/include/c++/7/vector:65:0,
from portals.cpp:5:
/usr/include/c++/7/bits/stl_bvector.h:682:5: note: candidate: std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(const std::vector<bool, _Alloc>&) [with _Alloc = std::allocator<bool>]
operator=(const vector& __x)
^~~~~~~~
/usr/include/c++/7/bits/stl_bvector.h:682:5: note: no known conversion for argument 1 from 'int' to 'const std::vector<bool>&'
/usr/include/c++/7/bits/stl_bvector.h:713:5: note: candidate: std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(std::vector<bool, _Alloc>&&) [with _Alloc = std::allocator<bool>]
operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move())
^~~~~~~~
/usr/include/c++/7/bits/stl_bvector.h:713:5: note: no known conversion for argument 1 from 'int' to 'std::vector<bool>&&'
/usr/include/c++/7/bits/stl_bvector.h:743:5: note: candidate: std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(std::initializer_list<bool>) [with _Alloc = std::allocator<bool>]
operator=(initializer_list<bool> __l)
^~~~~~~~
/usr/include/c++/7/bits/stl_bvector.h:743:5: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<bool>'
portals.cpp:150:11: error: no match for 'operator=' (operand types are 'std::vector<bool>' and 'int')
used[i]=0;
^
In file included from /usr/include/c++/7/vector:65:0,
from portals.cpp:5:
/usr/include/c++/7/bits/stl_bvector.h:682:5: note: candidate: std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(const std::vector<bool, _Alloc>&) [with _Alloc = std::allocator<bool>]
operator=(const vector& __x)
^~~~~~~~
/usr/include/c++/7/bits/stl_bvector.h:682:5: note: no known conversion for argument 1 from 'int' to 'const std::vector<bool>&'
/usr/include/c++/7/bits/stl_bvector.h:713:5: note: candidate: std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(std::vector<bool, _Alloc>&&) [with _Alloc = std::allocator<bool>]
operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move())
^~~~~~~~
/usr/include/c++/7/bits/stl_bvector.h:713:5: note: no known conversion for argument 1 from 'int' to 'std::vector<bool>&&'
/usr/include/c++/7/bits/stl_bvector.h:743:5: note: candidate: std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(std::initializer_list<bool>) [with _Alloc = std::allocator<bool>]
operator=(initializer_list<bool> __l)
^~~~~~~~
/usr/include/c++/7/bits/stl_bvector.h:743:5: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<bool>'
portals.cpp:192:18: error: no match for 'operator&&' (operand types are 'std::vector<bool>' and 'bool')
}while(used[v] && !q.empty());
~~~~~~~~^~~~~~~~~~~~~
portals.cpp:192:18: note: candidate: operator&&(bool, bool) <built-in>
portals.cpp:192:18: note: no known conversion for argument 1 from 'std::vector<bool>' to 'bool'
portals.cpp:194:19: error: no match for 'operator==' (operand types are 'std::vector<bool>' and 'int')
if(used[v]==1 && v==-1)
~~~~~~~^~~
In file included from /usr/include/c++/7/iosfwd:40:0,
from /usr/include/c++/7/ios:38,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from portals.cpp:2:
/usr/include/c++/7/bits/postypes.h:216:5: note: candidate: template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)
operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
^~~~~~~~
/usr/include/c++/7/bits/postypes.h:216:5: note: template argument deduction/substitution failed:
portals.cpp:194:21: note: 'std::vector<bool>' is not derived from 'const std::fpos<_StateT>'
if(used[v]==1 && v==-1)
^
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from portals.cpp:2:
/usr/include/c++/7/bits/stl_pair.h:443:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:443:5: note: template argument deduction/substitution failed:
portals.cpp:194:21: note: 'std::vector<bool>' is not derived from 'const std::pair<_T1, _T2>'
if(used[v]==1 && v==-1)
^
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from portals.cpp:2:
/usr/include/c++/7/bits/stl_iterator.h:299:5: note: candidate: template<class _Iterator> constexpr bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
operator==(const reverse_iterator<_Iterator>& __x,
^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:299:5: note: template argument deduction/substitution failed:
portals.cpp:194:21: note: 'std::vector<bool>' is not derived from 'const std::reverse_iterator<_Iterator>'
if(used[v]==1 && v==-1)
^
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from portals.cpp:2:
/usr/include/c++/7/bits/stl_iterator.h:337:5: note: candidate: template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
operator==(const reverse_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:337:5: note: template argument deduction/substitution failed:
portals.cpp:194:21: note: 'std::vector<bool>' is not derived from 'const std::reverse_iterator<_Iterator>'
if(used[v]==1 && v==-1)
^
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from portals.cpp:2:
/usr/include/c++/7/bits/stl_iterator.h:1118:5: note: candidate: template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
operator==(const move_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:1118:5: note: template argument deduction/substitution failed:
portals.cpp:194:21: note: 'std::vector<bool>' is not derived from 'const std::move_iterator<_IteratorL>'
if(used[v]==1 && v==-1)
^
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from portals.cpp:2:
/usr/include/c++/7/bits/stl_iterator.h:1124:5: note: candidate: template<class _Iterator> constexpr bool std::operator==(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)
operator==(const move_iterator<_Iterator>& __x,
^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:1124:5: note: template argument deduction/substitution failed:
portals.cpp:194:21: note: 'std::vector<bool>' is not derived from 'const std::move_iterator<_IteratorL>'
if(used[v]==1 && v==-1)
^
In file included from /usr/include/c++/7/string:41:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from portals.cpp:2:
/usr/include/c++/7/bits/allocator.h:146:5: note: candidate: template<class _T1, class _T2> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&)
operator==(const allocator<_T1>&, const allocator<_T2>&)
^~~~~~~~
/usr/include/c++/7/bits/allocator.h:146:5: note: template argument deduction/substitution failed:
portals.cpp:194:21: note: 'std::vector<bool>' is not derived from 'const std::allocator<_CharT>'
if(used[v]==1 && v==-1)
^
In file included from /usr/include/c++/7/string:41:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from portals.cpp:2:
/usr/include/c++/7/bits/allocator.h:152:5: note: candidate: template<class _Tp> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_CharT>&)
operator==(const allocator<_Tp>&, const allocator<_Tp>&)
^~~~~~~~
/usr/include/c++/7/bits/allocator.h:152:5: note: template argument deduction/substitution failed:
portals.cpp:194:21: note: 'std::vector<bool>' is not derived from 'const std::allocator<_CharT>'
if(used[v]==1 && v==-1)
^
In file included from /usr/include/c++/7/bits/basic_string.h:48:0,
from /usr/include/c++/7/string:52,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from portals.cpp:2:
/usr/include/c++/7/string_view:450:5: note: candidate: template<class _CharT, class _Traits> constexpr bool std::operator==(std::basic_string_view<_CharT, _Traits>, std::basic_string_view<_CharT, _Traits>)
operator==(basic_string_view<_CharT, _Traits> __x,
^~~~~~~~
/usr/include/c++/7/string_view:450:5: note: template argument deduction/substitution failed:
portals.cpp:194:21: note: 'std::vector<bool>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
if(used[v]==1 && v==-1)
^
In file included from /usr/include/c++/7/bits/basic_string.h:48:0,
from /usr/include/c++/7/string:52,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from portals.cpp:2:
/usr/include/c++/7/string_view:456:5: note: candidate: template<class _CharT, class _Traits> constexpr bool std::operator==(std::basic_string_view<_CharT, _Traits>, std::__detail::__idt<std::basic_string_view<_CharT, _Traits> >)
operator==(basic_string_view<_CharT, _Traits> __x,
^~~~~~~~
/usr/include/c++/7/string_view:456:5: note: template argument deduction/substitution failed:
portals.cpp:194:21: note: 'std::vector<bool>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
if(used[v]==1 && v==-1)
^
In file included from /usr/include/c++/7/bits/basic_string.h:48:0,
from /usr/include/c++/7/string:52,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from portals.cpp:2:
/usr/include/c++/7/string_view:462:5: note: candidate: template<class _CharT, class _Traits> constexpr bool std::operator==(std::__detail::__idt<std::basic_string_view<_CharT, _Traits> >, std::basic_string_view<_CharT, _Traits>)
operator==(__detail::__idt<basic_string_view<_CharT, _Traits>> __x,
^~~~~~~~
/usr/include/c++/7/string_view:462:5: note: template argument deduction/substitution failed:
portals.cpp:194:21: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
if(used[v]==1 && v==-1)
^
In file included from /usr/include/c++/7/string:52:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from portals.cpp:2:
/usr/include/c++/7/bits/basic_string.h:5997:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:5997:5: note: template argument deduction/substitution failed:
portals.cpp:194:21: note: 'std::vector<bool>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
if(used[v]==1 && v==-1)
^
In file included from /usr/include/c++/7/string:52:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from portals.cpp:2:
/usr/include/c++/7/bits/basic_string.h:6005:5: note: candidate: template<class _CharT> typename __gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type std::operator==(const std::__cxx11::basic_string<_CharT>&, const std::__cxx11::basic_string<_CharT>&)
operator==(const basic_string<_CharT>& __lhs,
^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:6005:5: note: template argument deduction/substitution failed:
portals.cpp:194:21: note: 'std::vector<bool>' is not derived from 'const std::__cxx11::basic_string<_CharT>'
if(used[v]==1 && v==-1)
^
In file included from /usr/include/c++/7/string:52:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from portals.cpp:2:
/usr/include/c++/7/bits/basic_string.h:6019:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator==(const _CharT* __lhs,
^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:6019:5: note: template argument deduction/substitution failed:
portals.cpp:194:21: note: mismatched types 'const _CharT*' and 'std::vector<bool>'
if(used[v]==1 && v==-1)
^
In file included from /usr/include/c++/7/string:52:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from portals.cpp:2:
/usr/include/c++/7/bits/basic_string.h:6031:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:6031:5: note: template argument deduction/substitution failed:
portals.cpp:194:21: note: 'std::vector<bool>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Tra