Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long;
signed main() {
    int Q,H,S,D;
    int N;
    cin >> Q >> H >> S >> D >> N;
    int L1 = min({Q*4,Q*2+H,H*2,S});
    cout << min(L1*N,N/2*D+N%2*L1) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:5:5: note: in expansion of macro 'int'
    5 |     int Q,H,S,D;
      |     ^~~
a.cc:5:9: error: 'Q' was not declared in this scope
    5 |     int Q,H,S,D;
      |         ^
a.cc:5:11: error: 'H' was not declared in this scope
    5 |     int Q,H,S,D;
      |           ^
a.cc:5:13: error: 'S' was not declared in this scope
    5 |     int Q,H,S,D;
      |             ^
a.cc:5:15: error: 'D' was not declared in this scope
    5 |     int Q,H,S,D;
      |               ^
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:6:5: note: in expansion of macro 'int'
    6 |     int N;
      |     ^~~
a.cc:6:9: error: 'N' was not declared in this scope
    6 |     int N;
      |         ^
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:8:5: note: in expansion of macro 'int'
    8 |     int L1 = min({Q*4,Q*2+H,H*2,S});
      |     ^~~
a.cc:8:9: error: 'L1' was not declared in this scope; did you mean 'y1'?
    8 |     int L1 = min({Q*4,Q*2+H,H*2,S});
      |         ^~
      |         y1
a.cc:8:17: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
    8 |     int L1 = min({Q*4,Q*2+H,H*2,S});
      |              ~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   candidate expects 2 arguments, 1 provided