Problem threetowers
User PlayVoltz
Submission Time 2024-02-28 10:45:23
Score 0
Max Time N/A
Max Memory N/A

Compile Error

threetowers.cpp: In function ‘int main()’:
threetowers.cpp:11:31: error: no matching function for call to ‘max(int, long long int)’
11 | for (int i=n; i<=max(n-2, 1ll); ++i)for (int j=0; j<i; ++j)if ((c[i]-c[j]!=b[i]-b[j]||!(c[i]-c[j]))&&(c[i]-c[j]!=s[i]-s[j]||(!c[i]-c[j]))&&(b[i]-b[j]!=s[i]-s[j]||!(b[i]-b[j])))ans=max(ans, i-j);
| ^
In file included from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from threetowers.cpp:1:
/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:
threetowers.cpp:11:31: note: deduced c