snake_escaping.cpp: In function 'int main()':
snake_escaping.cpp:44:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
44 | for(int i = 1; i < pw.size(); i++)
| ~~^~~~~~~~~~~
snake_escaping.cpp:47:42: error: no matching function for call to 'max(int, ll)'
47 | vector<ll> dp, bit(pw[max(0, l - half)] + 1, -1), bin_to3((1ll << max(0, l - half)) + 1), from3_to_bin(pw[max(0, l - half)] + 1);
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from snake_escaping.cpp:4:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:47:42: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
47 | vector<ll> dp, bit(pw[max(0, l - half)] + 1, -1), bin_to3((1ll << max(0, l - half)) + 1), from3_to_bin(pw[max(0, l - half)] + 1);
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from snake_escaping.cpp:4:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:47:42: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
47 | vector<ll> dp, bit(pw[max(0, l - half)] + 1, -1), bin_to3((1ll << max(0, l - half)) + 1), from3_to_bin(pw[max(0, l - half)] + 1);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from snake_escaping.cpp:11:
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:47:42: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
47 | vector<ll> dp, bit(pw[max(0, l - half)] + 1, -1), bin_to3((1ll << max(0, l - half)) + 1), from3_to_bin(pw[max(0, l - half)] + 1);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from snake_escaping.cpp:11:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:47:42: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
47 | vector<ll> dp, bit(pw[max(0, l - half)] + 1, -1), bin_to3((1ll << max(0, l - half)) + 1), from3_to_bin(pw[max(0, l - half)] + 1);
| ^
snake_escaping.cpp:47:86: error: no matching function for call to 'max(int, ll)'
47 | vector<ll> dp, bit(pw[max(0, l - half)] + 1, -1), bin_to3((1ll << max(0, l - half)) + 1), from3_to_bin(pw[max(0, l - half)] + 1);
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from snake_escaping.cpp:4:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:47:86: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
47 | vector<ll> dp, bit(pw[max(0, l - half)] + 1, -1), bin_to3((1ll << max(0, l - half)) + 1), from3_to_bin(pw[max(0, l - half)] + 1);
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from snake_escaping.cpp:4:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:47:86: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
47 | vector<ll> dp, bit(pw[max(0, l - half)] + 1, -1), bin_to3((1ll << max(0, l - half)) + 1), from3_to_bin(pw[max(0, l - half)] + 1);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from snake_escaping.cpp:11:
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:47:86: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
47 | vector<ll> dp, bit(pw[max(0, l - half)] + 1, -1), bin_to3((1ll << max(0, l - half)) + 1), from3_to_bin(pw[max(0, l - half)] + 1);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from snake_escaping.cpp:11:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:47:86: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
47 | vector<ll> dp, bit(pw[max(0, l - half)] + 1, -1), bin_to3((1ll << max(0, l - half)) + 1), from3_to_bin(pw[max(0, l - half)] + 1);
| ^
snake_escaping.cpp:47:126: error: no matching function for call to 'max(int, ll)'
47 | vector<ll> dp, bit(pw[max(0, l - half)] + 1, -1), bin_to3((1ll << max(0, l - half)) + 1), from3_to_bin(pw[max(0, l - half)] + 1);
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from snake_escaping.cpp:4:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:47:126: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
47 | vector<ll> dp, bit(pw[max(0, l - half)] + 1, -1), bin_to3((1ll << max(0, l - half)) + 1), from3_to_bin(pw[max(0, l - half)] + 1);
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from snake_escaping.cpp:4:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:47:126: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
47 | vector<ll> dp, bit(pw[max(0, l - half)] + 1, -1), bin_to3((1ll << max(0, l - half)) + 1), from3_to_bin(pw[max(0, l - half)] + 1);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from snake_escaping.cpp:11:
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:47:126: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
47 | vector<ll> dp, bit(pw[max(0, l - half)] + 1, -1), bin_to3((1ll << max(0, l - half)) + 1), from3_to_bin(pw[max(0, l - half)] + 1);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from snake_escaping.cpp:11:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:47:126: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
47 | vector<ll> dp, bit(pw[max(0, l - half)] + 1, -1), bin_to3((1ll << max(0, l - half)) + 1), from3_to_bin(pw[max(0, l - half)] + 1);
| ^
snake_escaping.cpp:49:45: error: no matching function for call to 'max(int, ll)'
49 | for(int i = 0; i < (1 << max(0, l - half)); i++){
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from snake_escaping.cpp:4:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:49:45: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
49 | for(int i = 0; i < (1 << max(0, l - half)); i++){
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from snake_escaping.cpp:4:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:49:45: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
49 | for(int i = 0; i < (1 << max(0, l - half)); i++){
| ^
In file included from /usr/include/c++/10/algorithm:62,
from snake_escaping.cpp:11:
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:49:45: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
49 | for(int i = 0; i < (1 << max(0, l - half)); i++){
| ^
In file included from /usr/include/c++/10/algorithm:62,
from snake_escaping.cpp:11:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:49:45: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
49 | for(int i = 0; i < (1 << max(0, l - half)); i++){
| ^
snake_escaping.cpp:52:36: error: no matching function for call to 'max(int, ll)'
52 | for(int j = max(0, l - half) - 1; j >= 0; j--){
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from snake_escaping.cpp:4:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:52:36: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
52 | for(int j = max(0, l - half) - 1; j >= 0; j--){
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from snake_escaping.cpp:4:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:52:36: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
52 | for(int j = max(0, l - half) - 1; j >= 0; j--){
| ^
In file included from /usr/include/c++/10/algorithm:62,
from snake_escaping.cpp:11:
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:52:36: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
52 | for(int j = max(0, l - half) - 1; j >= 0; j--){
| ^
In file included from /usr/include/c++/10/algorithm:62,
from snake_escaping.cpp:11:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:52:36: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
52 | for(int j = max(0, l - half) - 1; j >= 0; j--){
| ^
snake_escaping.cpp:65:43: error: no matching function for call to 'max(int, ll)'
65 | for(int i = 0; i < pw[(max(0, l - half))]; i++){
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from snake_escaping.cpp:4:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
snake_escaping.cpp:65:43: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
65 | for(int i = 0; i < pw[(max(0, l - half))]; i++){
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/