race.cpp: In function 'void dfsSize(long long int, long long int)':
race.cpp:87:21: error: no matching function for call to 'begin(std::pair<long long int, long long int>&)'
for( auto j : adj[i] )
^
In file included from /usr/include/c++/7/string:51: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 race.cpp:2:
/usr/include/c++/7/bits/range_access.h:105:37: note: candidate: template<class _Tp> const _Tp* std::begin(const std::valarray<_Tp>&)
template<typename _Tp> const _Tp* begin(const valarray<_Tp>&);
^~~~~
/usr/include/c++/7/bits/range_access.h:105:37: note: template argument deduction/substitution failed:
race.cpp:87:21: note: 'std::pair<long long int, long long int>' is not derived from 'const std::valarray<_Tp>'
for( auto j : adj[i] )
^
In file included from /usr/include/c++/7/string:51: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 race.cpp:2:
/usr/include/c++/7/bits/range_access.h:104:31: note: candidate: template<class _Tp> _Tp* std::begin(std::valarray<_Tp>&)
template<typename _Tp> _Tp* begin(valarray<_Tp>&);
^~~~~
/usr/include/c++/7/bits/range_access.h:104:31: note: template argument deduction/substitution failed:
race.cpp:87:21: note: 'std::pair<long long int, long long int>' is not derived from 'std::valarray<_Tp>'
for( auto j : adj[i] )
^
In file included from /usr/include/c++/7/string:51: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 race.cpp:2:
/usr/include/c++/7/bits/range_access.h:87:5: note: candidate: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::begin(_Tp (&)[_Nm])
begin(_Tp (&__arr)[_Nm])
^~~~~
/usr/include/c++/7/bits/range_access.h:87:5: note: template argument deduction/substitution failed:
race.cpp:87:21: note: mismatched types '_Tp [_Nm]' and 'std::pair<long long int, long long int>'
for( auto j : adj[i] )
^
In file included from /usr/include/c++/7/string:51: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 race.cpp:2:
/usr/include/c++/7/bits/range_access.h:58:5: note: candidate: template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)
begin(const _Container& __cont) -> decltype(__cont.begin())
^~~~~
/usr/include/c++/7/bits/range_access.h:58:5: note: template argument deduction/substitution failed:
/usr/include/c++/7/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.begin()) std::begin(const _Container&) [with _Container = std::pair<long long int, long long int>]':
race.cpp:87:21: required from here
/usr/include/c++/7/bits/range_access.h:58:56: error: 'const struct std::pair<long long int, long long int>' has no member named 'begin'
begin(const _Container& __cont) -> decltype(__cont.begin())
~~~~~~~^~~~~
/usr/include/c++/7/bits/range_access.h:48:5: note: candidate: template<class _Container> decltype (__cont.begin()) std::begin(_Container&)
begin(_Container& __cont) -> decltype(__cont.begin())
^~~~~
/usr/include/c++/7/bits/range_access.h:48:5: note: template argument deduction/substitution failed:
/usr/include/c++/7/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.begin()) std::begin(_Container&) [with _Container = std::pair<long long int, long long int>]':
race.cpp:87:21: required from here
/usr/include/c++/7/bits/range_access.h:48:50: error: 'struct std::pair<long long int, long long int>' has no member named 'begin'
begin(_Container& __cont) -> decltype(__cont.begin())
~~~~~~~^~~~~
In file included from /usr/include/c++/7/utility:76:0,
from /usr/include/c++/7/algorithm:60,
from race.cpp:1:
/usr/include/c++/7/initializer_list:89:5: note: candidate: template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
begin(initializer_list<_Tp> __ils) noexcept
^~~~~
/usr/include/c++/7/initializer_list:89:5: note: template argument deduction/substitution failed:
race.cpp:87:21: note: 'std::pair<long long int, long long int>' is not derived from 'std::initializer_list<_Tp>'
for( auto j : adj[i] )
^
race.cpp:87:21: error: no matching function for call to 'end(std::pair<long long int, long long int>&)'
In file included from /usr/include/c++/7/string:51: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 race.cpp:2:
/usr/include/c++/7/bits/range_access.h:107:37: note: candidate: template<class _Tp> const _Tp* std::end(const std::valarray<_Tp>&)
template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
^~~
/usr/include/c++/7/bits/range_access.h:107:37: note: template argument deduction/substitution failed:
race.cpp:87:21: note: 'std::pair<long long int, long long int>' is not derived from 'const std::valarray<_Tp>'
for( auto j : adj[i] )
^
In file included from /usr/include/c++/7/string:51: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 race.cpp:2:
/usr/include/c++/7/bits/range_access.h:106:31: note: candidate: template<class _Tp> _Tp* std::end(std::valarray<_Tp>&)
template<typename _Tp> _Tp* end(valarray<_Tp>&);
^~~
/usr/include/c++/7/bits/range_access.h:106:31: note: template argument deduction/substitution failed:
race.cpp:87:21: note: 'std::pair<long long int, long long int>' is not derived from 'std::valarray<_Tp>'
for( auto j : adj[i] )
^
In file included from /usr/include/c++/7/string:51: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 race.cpp:2:
/usr/include/c++/7/bits/range_access.h:97:5: note: candidate: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])
end(_Tp (&__arr)[_Nm])
^~~
/usr/include/c++/7/bits/range_access.h:97:5: note: template argument deduction/substitution failed:
race.cpp:87:21: note: mismatched types '_Tp [_Nm]' and 'std::pair<long long int, long long int>'
for( auto j : adj[i] )
^
In file included from /usr/include/c++/7/string:51: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 race.cpp:2:
/usr/include/c++/7/bits/range_access.h:78:5: note: candidate: template<class _Container> decltype (__cont.end()) std::end(const _Container&)
end(const _Container& __cont) -> decltype(__cont.end())
^~~
/usr/include/c++/7/bits/range_access.h:78:5: note: template argument deduction/substitution failed:
/usr/include/c++/7/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.end()) std::end(const _Container&) [with _Container = std::pair<long long int, long long int>]':
race.cpp:87:21: required from here
/usr/include/c++/7/bits/range_access.h:78:54: error: 'const struct std::pair<long long int, long long int>' has no member named 'end'; did you mean 'second'?
end(const _Container& __cont) -> decltype(__cont.end())
~~~~~~~^~~
second
/usr/include/c++/7/bits/range_access.h:68:5: note: candidate: template<class _Container> decltype (__cont.end()) std::end(_Container&)
end(_Container& __cont) -> decltype(__cont.end())
^~~
/usr/include/c++/7/bits/range_access.h:68:5: note: template argument deduction/substitution failed:
/usr/include/c++/7/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.end()) std::end(_Container&) [with _Container = std::pair<long long int, long long int>]':
race.cpp:87:21: required from here
/usr/include/c++/7/bits/range_access.h:68:48: error: 'struct std::pair<long long int, long long int>' has no member named 'end'; did you mean 'second'?
end(_Container& __cont) -> decltype(__cont.end())
~~~~~~~^~~
second
In file included from /usr/include/c++/7/utility:76:0,
from /usr/include/c++/7/algorithm:60,
from race.cpp:1:
/usr/include/c++/7/initializer_list:99:5: note: candidate: template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
end(initializer_list<_Tp> __ils) noexcept
^~~
/usr/include/c++/7/initializer_list:99:5: note: template argument deduction/substitution failed:
race.cpp:87:21: note: 'std::pair<long long int, long long int>' is not derived from 'std::initializer_list<_Tp>'
for( auto j : adj[i] )
^
race.cpp: In function 'void dfs(long long int, long long int, bool)':
race.cpp:118:21: error: no matching function for call to 'begin(std::pair<long long int, long long int>&)'
for( auto j : adj[i] )
^
In file included from /usr/include/c++/7/string:51: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 race.cpp:2:
/usr/include/c++/7/bits/range_access.h:105:37: note: candidate: template<class _Tp> const _Tp* std::begin(const std::valarray<_Tp>&)
template<typename _Tp> const _Tp* begin(const valarray<_Tp>&);
^~~~~
/usr/include/c++/7/bits/range_access.h:105:37: note: template argument deduction/substitution failed:
race.cpp:118:21: note: 'std::pair<long long int, long long int>' is not derived from 'const std::valarray<_Tp>'
for( auto j : adj[i] )
^
In file included from /usr/include/c++/7/string:51: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 race.cpp:2:
/usr/include/c++/7/bits/range_access.h:104:31: note: candidate: template<class _Tp> _Tp* std::begin(std::valarray<_Tp>&)
template<typename _Tp> _Tp* begin(valarray<_Tp>&);
^~~~~
/usr/include/c++/7/bits/range_access.h:104:31: note: template argument deduction/substitution failed:
race.cpp:118:21: note: 'std::pair<long long int, long long int>' is not derived from 'std::valarray<_Tp>'
for( auto j : adj[i] )
^
In file included from /usr/include/c++/7/string:51: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 race.cpp:2:
/usr/include/c++/7/bits/range_access.h:87:5: note: candidate: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::begin(_Tp (&)[_Nm])
begin(_Tp (&__arr)[_Nm])
^~~~~
/usr/include/c++/7/bits/range_access.h:87:5: note: template argument deduction/substitution failed:
race.cpp:118:21: note: mismatched types '_Tp [_Nm]' and 'std::pair<long long int, long long int>'
for( auto j : adj[i] )
^
In file included from /usr/include/c++/7/string:51: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 race.cpp:2:
/usr/include/c++/7/bits/range_access.h:58:5: note: candidate: template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)
begin(const _Container& __cont) -> decltype(__cont.begin())
^~~~~
/usr/include/c++/7/bits/range_access.h:58:5: note: template argument deduction/substitution failed:
/usr/include/c++/7/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.begin()) std::begin(const _Container&) [with _Container = std::pair<long long int, long long int>]':
race.cpp:118:21: required from here
/usr/include/c++/7/bits/range_access.h:58:56: error: 'const struct std::pair<long long int, long long int>' has no member named 'begin'
begin(const _Container& __cont) -> decltype(__cont.begin())
~~~~~~~^~~~~
/usr/include/c++/7/bits/range_access.h:48:5: note: candidate: template<class _Container> decltype (__cont.begin()) std::begin(_Container&)
begin(_Container& __cont) -> decltype(__cont.begin())
^~~~~
/usr/include/c++/7/bits/range_access.h:48:5: note: template argument deduction/substitution failed:
/usr/include/c++/7/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.begin()) std::begin(_Container&) [with _Container = std::pair<long long int, long long int>]':
race.cpp:118:21: required from here
/usr/include/c++/7/bits/range_access.h:48:50: error: 'struct std::pair<long long int, long long int>' has no member named 'begin'
begin(_Container& __cont) -> decltype(__cont.begin())
~~~~~~~^~~~~
In file included from /usr/include/c++/7/utility:76:0,
from /usr/include/c++/7/algorithm:60,
from race.cpp:1:
/usr/include/c++/7/initializer_list:89:5: note: candidate: template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
begin(initializer_list<_Tp> __ils) noexcept
^~~~~
/usr/include/c++/7/initializer_list:89:5: note: template argument deduction/substitution failed:
race.cpp:118:21: note: 'std::pair<long long int, long long int>' is not derived from 'std::initializer_list<_Tp>'
for( auto j : adj[i] )
^
race.cpp:118:21: error: no matching function for call to 'end(std::pair<long long int, long long int>&)'
In file included from /usr/include/c++/7/string:51: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 race.cpp:2:
/usr/include/c++/7/bits/range_access.h:107:37: note: candidate: template<class _Tp> const _Tp* std::end(const std::valarray<_Tp>&)
template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
^~~
/usr/include/c++/7/bits/range_access.h:107:37: note: template argument deduction/substitution failed:
race.cpp:118:21: note: 'std::pair<long long int, long long int>' is not derived from 'const std::valarray<_Tp>'
for( auto j : adj[i] )
^
In file included from /usr/include/c++/7/string:51: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 race.cpp:2:
/usr/include/c++/7/bits/range_access.h:106:31: note: candidate: template<class _Tp> _Tp* std::end(std::valarray<_Tp>&)
template<typename _Tp> _Tp* end(valarray<_Tp>&);
^~~
/usr/include/c++/7/bits/range_access.h:106:31: note: template argument deduction/substitution failed:
race.cpp:118:21: note: 'std::pair<long long int, long long int>' is not derived from 'std::valarray<_Tp>'
for( auto j : adj[i] )
^
In file included from /usr/include/c++/7/string:51: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 race.cpp:2:
/usr/include/c++/7/bits/range_access.h:97:5: note: candidate: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])
end(_Tp (&__arr)[_Nm])
^~~
/usr/include/c++/7/bits/range_access.h:97:5: note: template argument deduction/substitution failed:
race.cpp:118:21: note: mismatched types '_Tp [_Nm]' and 'std::pair<long long int, long long int>'
for( auto j : adj[i] )
^
I