Submission #19724054


Source Code Expand

Copy
#include <iostream>

using namespace std;

int main() {
int a1, a2,a3,a4;
cin>>a1>>a2>>a3>>a4;
cout<<min(a1,a2,a3,a4)<<endl;


    return 0;
}

Submission Info

Submission Time
Task A - ABC Preparation
User habiba14
Language C++ (GCC 9.2.1)
Score 0
Code Size 153 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:8:22: error: no matching function for call to ‘min(int&, int&, int&, int&)’
    8 | cout<<min(a1,a2,a3,a4)<<endl;
      |                      ^
In file included from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/ios:40,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from ./Main.cpp:1:
/usr/include/c++/9/bits/stl_algobase.h:198:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)’
  198 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/9/bits/stl_algobase.h:198:5: note:   template argument deduction/substitution failed:
./Main.cpp:8:22: note:   candidate expects 2 arguments, 4 provided
    8 | cout<<min(a1,a2,a3,a4)<<endl;
      |                      ^
In file included from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/ios:40,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from ./Main.cpp:1:
/usr/include/c++/9/bits/stl_algobase.h:246:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)’
  246 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/9/bits/stl_algobase.h:246:5: note:   template argument deduction/substitution failed:
./Main.cpp:8:22: note:   candidate expects 3 arguments, 4 provided
    8 | cout<<min(a1,a2,a3,a4)<<endl;
      |                      ^