aliens.cpp: In function 'std::pair<long long int, long long int> getPos(long long int, long long int, long long int, long long int)':
aliens.cpp:98:37: error: no matching function for call to 'max(int, long long int)'
98 | int l = max(1, y - (1 << pw)), r = y;
| ^
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from aliens.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:
aliens.cpp:98:37: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
98 | int l = max(1, y - (1 << pw)), r = y;
| ^
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from aliens.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:
aliens.cpp:98:37: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
98 | int l = max(1, y - (1 << pw)), r = y;
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from aliens.cpp:1:
/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:
aliens.cpp:98:37: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
98 | int l = max(1, y - (1 << pw)), r = y;
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from aliens.cpp:1:
/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:
aliens.cpp:98:37: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
98 | int l = max(1, y - (1 << pw)), r = y;
| ^
aliens.cpp:100:20: error: 'r' was not declared in this scope
100 | while(l <= r){
| ^
aliens.cpp:106:27: error: 'r' was not declared in this scope
106 | return {x, min(y, r + 1)};
| ^
aliens.cpp:106:33: error: could not convert '{x, <expression error>}' from '<brace-enclosed initializer list>' to 'std::pair<long long int, long long int>'
106 | return {x, min(y, r + 1)};
| ^
| |
| <brace-enclosed initializer list>
aliens.cpp:109:37: error: no matching function for call to 'max(int, long long int)'
109 | int l = max(1, x - (1 << pw)), r = x;
| ^
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from aliens.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:
aliens.cpp:109:37: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
109 | int l = max(1, x - (1 << pw)), r = x;
| ^
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from aliens.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:
aliens.cpp:109:37: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
109 | int l = max(1, x - (1 << pw)), r = x;
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from aliens.cpp:1:
/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:
aliens.cpp:109:37: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
109 | int l = max(1, x - (1 << pw)), r = x;
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from aliens.cpp:1:
/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:
aliens.cpp:109:37: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
109 | int l = max(1, x - (1 << pw)), r = x;
| ^
aliens.cpp:111:20: error: 'r' was not declared in this scope
111 | while(l <= r){
| ^
aliens.cpp:116:24: error: 'r' was not declared in this scope
116 | return {min(x, r + 1), y};
| ^
aliens.cpp:116:33: error: could not convert '{<expression error>, y}' from '<brace-enclosed initializer list>' to 'std::pair<long long int, long long int>'
116 | return {min(x, r + 1), y};
| ^
| |
| <brace-enclosed initializer list>