Problem | laughter |
---|---|
User | chenweilian |
Submission Time | 2024-12-18 15:08:16 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
laughter.cpp: In function ‘bool Can(long long int)’:
laughter.cpp:80:28: error: no matching function for call to ‘max(int, long long int)’
80 | int xl=max(1,x[i]-t),xr=min(n,x[i]+t),yl=max(1,y[i]-t),yr=min(m,y[i]+t);
| ^
In file included from /usr/include/c++/9/algorithm:61,
from laughter.cpp:2:
/usr/include/c++/9/bits/stl_algobase.h:222:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)’
222 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/9/bits/stl_algobase.h:222:5: note: template argument deduction/substitution failed:
laughter.cpp:80:28: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘long long int’)
80 | int xl=max(1,x[i]-t),xr=min(n,x[i]+t),yl=max(1,y[i]-t),yr=min(m,y[i]+t);
| ^
In file included from /usr/include/c++/9/algorithm:61,