Language: C++

#include<iostream>
using namespace std;
#define lli long long int
#include<math.h>
#include<iomanip>
int main(){
  lli  w,h,x,y;
  cin>>w>>h>>x>>y;
  lli k=x*h,l=y*w;
  double m=w*h-k,n=w*h-l;
  lli a=min(k,m),b=min(l,n);
  if(a==b)
    cout<<fixed<<setprecision(9)<<)(double) min(k,m)<<" "<<"1";
  else{
    if(a>b){
      cout<<fixed<<setprecision(9)<<(double) min(k,m);
      if(a==max(k,m)||a==l||a==n)
        cout<<" "<<"1";
      else
        cout<<" "<<"0";
    }
    else{
      cout<<fixed<<setprecision(9)<<(double)min(l,n);
      if(b==max(l,n)||b==a||b==k)
        cout<<" "<<"1";
      else
        cout<<" "<<"0";
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: no matching function for call to 'min(long long int&, double&)'
   11 |   lli a=min(k,m),b=min(l,n);
      |         ~~~^~~~~
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: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:   template argument deduction/substitution failed:
a.cc:11:12: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'double')
   11 |   lli a=min(k,m),b=min(l,n);
      |         ~~~^~~~~
/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, 2 provided
a.cc:12:9: error: 'b' was not declared in this scope
   12 |   if(a==b)
      |         ^
a.cc:13:35: error: expected primary-expression before ')' token
   13 |     cout<<fixed<<setprecision(9)<<)(double) min(k,m)<<" "<<"1";
      |                                   ^
a.cc:16:49: error: no matching function for call to 'min(long long int&, double&)'
   16 |       cout<<fixed<<setprecision(9)<<(double) min(k,m);
      |                                              ~~~^~~~~
/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:   template argument deduction/substitution failed:
a.cc:16:49: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'double')
   16 |       cout<<fixed<<setprecision(9)<<(double) min(k,m);
      |                                              ~~~^~~~~
/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, 2 provided
a.cc:17:16: error: no matching function for call to 'max(long long int&, double&)'
   17 |       if(a==max(k,m)||a==l||a==n)
      |             ~~~^~~~~
/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:17:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'double')
   17 |       if(a==max(k,m)||a==l||a==n)
      |             ~~~^~~~~
/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:23:48: error: no matching function for call to 'min(long long int&, double&)'
   23 |       cout<<fixed<<setprecision(9)<<(double)min(l,n);
      |                                             ~~~^~~~~
/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:   template argument deduction/substitution failed:
a.cc:23:48: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'double')
   23 |       cout<<fixed<<setprecision(9)<<(double)min(l,n);
      |                                             ~~~^~~~~
/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, 2 provided
a.cc:24:16: error: no matching function for call to 'max(long long int&, double&)'
   24 |       if(b==max(l,n)||b==a||b==k)
      |             ~~~^~~~~
/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:24:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'double')
   24 |       if(b==max(l,n)||b==a||b==k)
      |             ~~~^~~~~
/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