mars.cpp:16:21: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
16 | const int oo = 1e18 + 7, mod = 1e9 + 7;
| ~~~~~^~~
mars.cpp: In function 'void prep(int)':
mars.cpp:34:61: error: no matching function for call to 'max(long long int, const int&)'
34 | route[id][i][j].pb({i - 2 * max(0LL, min(k, (i - 1) / 2)), j - 2 * max(0LL, min(k, (j - 1) / 2))});
| ^
In file included from /usr/include/c++/10/vector:60,
from mars.h:1,
from mars.cpp:1:
/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:
mars.cpp:34:61: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
34 | route[id][i][j].pb({i - 2 * max(0LL, min(k, (i - 1) / 2)), j - 2 * max(0LL, min(k, (j - 1) / 2))});
| ^
In file included from /usr/include/c++/10/vector:60,
from mars.h:1,
from mars.cpp:1:
/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:
mars.cpp:34:61: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
34 | route[id][i][j].pb({i - 2 * max(0LL, min(k, (i - 1) / 2)), j - 2 * max(0LL, min(k, (j - 1) / 2))});
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from mars.cpp:2:
/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:
mars.cpp:34:61: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
34 | route[id][i][j].pb({i - 2 * max(0LL, min(k, (i - 1) / 2)), j - 2 * max(0LL, min(k, (j - 1) / 2))});
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from mars.cpp:2:
/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:
mars.cpp:34:61: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
34 | route[id][i][j].pb({i - 2 * max(0LL, min(k, (i - 1) / 2)), j - 2 * max(0LL, min(k, (j - 1) / 2))});
| ^
mars.cpp:34:100: error: no matching function for call to 'max(long long int, const int&)'
34 | route[id][i][j].pb({i - 2 * max(0LL, min(k, (i - 1) / 2)), j - 2 * max(0LL, min(k, (j - 1) / 2))});
| ^
In file included from /usr/include/c++/10/vector:60,
from mars.h:1,
from mars.cpp:1:
/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:
mars.cpp:34:100: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
34 | route[id][i][j].pb({i - 2 * max(0LL, min(k, (i - 1) / 2)), j - 2 * max(0LL, min(k, (j - 1) / 2))});
| ^
In file included from /usr/include/c++/10/vector:60,
from mars.h:1,
from mars.cpp:1:
/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:
mars.cpp:34:100: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
34 | route[id][i][j].pb({i - 2 * max(0LL, min(k, (i - 1) / 2)), j - 2 * max(0LL, min(k, (j - 1) / 2))});
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from mars.cpp:2:
/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:
mars.cpp:34:100: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
34 | route[id][i][j].pb({i - 2 * max(0LL, min(k, (i - 1) / 2)), j - 2 * max(0LL, min(k, (j - 1) / 2))});
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from mars.cpp:2:
/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:
mars.cpp:34:100: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
34 | route[id][i][j].pb({i - 2 * max(0LL, min(k, (i - 1) / 2)), j - 2 * max(0LL, min(k, (j - 1) / 2))});
| ^
mars.cpp:34:102: error: no matching function for call to 'std::vector<std::pair<int, int> >::push_back(<brace-enclosed initializer list>)'
34 | route[id][i][j].pb({i - 2 * max(0LL, min(k, (i - 1) / 2)), j - 2 * max(0LL, min(k, (j - 1) / 2))});
| ^
In file included from /usr/include/c++/10/vector:67,
from mars.h:1,
from mars.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:1187:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]'
1187 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1187:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::pair<int, int>&'}
1187 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_vector.h:1203:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]'
1203 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1203:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::pair<int, int> >::value_type&&' {aka 'std::pair<int, int>&&'}
1203 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~