Problem car
User Hengweezy
Submission Time 2024-02-11 12:51:23
Score 0
Max Time N/A
Max Memory N/A

Compile Error

car.cpp: In function ‘int main()’:
car.cpp:28:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
28 | if(q > t1){
| ^~
car.cpp:29:8: error: invalid conversion from ‘int’ to ‘int*’ [-fpermissive]
29 | q = t1;
| ^~
| |
| int
car.cpp:33:33: error: no matching function for call to ‘max(int&, int*&)’
33 | p.push(make_pair(f, max(s, q)));
| ^
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 car.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_al