Language: C++

//
//  main.cpp
//  ABC_095_C
//
//  Created by Joe Mori on 2020/06/28.
//  Copyright © 2020 Joe Mori. All rights reserved.
//

#include <iostream>
#include<vector>

int main(int argc, const char * argv[]) {
    // insert code here...
    long long int A,B,C,X,Y,count;
    std::cin>>A>>B>>C>>X>>Y;
    count=A*X+B*Y+2*C*(X+Y);
    for(long long int i=0;i<=std::max(X,Y);i++){
        count=std::min(count,C*2*i+A*std::max(0,(X-i))+B*std::max((Y-i),0));
    }
    std::cout<<count<<std::endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:18:46: error: no matching function for call to 'max(int, long long int)'
   18 |         count=std::min(count,C*2*i+A*std::max(0,(X-i))+B*std::max((Y-i),0));
      |                                      ~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:9:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:18:46: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   18 |         count=std::min(count,C*2*i+A*std::max(0,(X-i))+B*std::max((Y-i),0));
      |                                      ~~~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
a.cc:18:66: error: no matching function for call to 'max(long long int, int)'
   18 |         count=std::min(count,C*2*i+A*std::max(0,(X-i))+B*std::max((Y-i),0));
      |                                                          ~~~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:18:66: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   18 |         count=std::min(count,C*2*i+A*std::max(0,(X-i))+B*std::max((Y-i),0));
      |                                                          ~~~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided