Problem duckhunt19
User AaravRastogi
Submission Time 2025-12-05 09:24:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

duckhunt19.cpp: In function ‘int main()’:
duckhunt19.cpp:8:14: error: ‘X’ was not declared in this scope
8 | cin >> n >> X;
| ^
duckhunt19.cpp:18:15: error: no matching function for call to ‘max(std::vector<long long int>&)’
18 | cout << max(O) + max(L);
| ^
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 duckhunt19.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:
duckhunt19.cpp:18:15: note: candidate expects 2 arguments, 1 provided
18 |