criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
using namespace std;
int main(){
int x,y,w,i=0,h,count=0;
double a=0,b;
  cin>>w>>h>>x>>y;
  if(w==h&&x==y){a=(float)w*h;count++;}
  else if(h/2==x){a=(float)w*h;}
  else if(w/2==y){a=(float)w*h;}
  else{
    while(1){
    a+=0.1;
    if(y==a*x)break;
    }
    if(y>a*w){
    b=w;
    while(y>a*b){
    b-=0.1;
    }
    w=b;
    }
    a=a*w*w;
    }
  }
  if(a>=w*h)a/=(float)2;
  cout<<a<<" "<<count;
}

Compiler output:
a.cc:25:3: error: expected unqualified-id before 'if'
   25 |   if(a>=w*h)a/=(float)2;
      |   ^~
a.cc:26:3: error: 'cout' does not name a type
   26 |   cout<<a<<" "<<count;
      |   ^~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

static int maxElement(const int* array, size_t size)
{
    size_t i;
    int max,num;

    assert(array != NULL);
    assert(size >= 1);

    max = array[0];
    num = 0;
    for (i = 1; i < size; ++i) {
        if (max < array[i]) {
            max = array[i];
            num = i;
        }
    }

    return num;
}

int main(){
    int w, h, x, y;
    cin >> w >> h >> x >> y;

    double area;
    int num = 0;

    double dist[4];
    dist[0] = (x*x) + (y*y);
    dist[1] = (x*x) + (h-y)*(h-y);
    dist[2] = (w-x)*(w-x) + (y*y);
    dist[3] = (w-x)*(w-x) + (h-y)*(h-y);

    if ( x == (w/2) || y == (h/2) ) {
        area = (w*h)/2;
        cout << setprecision(6) << area;
        if ( x == (w/2) && y == (h/2) ) {
            num = 1;
            cout << " " << num << endl;
        } else {
            cout << " " << num << endl;
        }
        return 0;
    } else {
        switch ( maxElement(dist, 4) ) {
            case 0: area = h*h*(x/y);break;
            case 1: area = (h*h*x)/(h-y);break;
            case 2: area = ((x*y)/(w-x))+y;break;
            case 3: area = (((y-h)/(w-x))*x)+y;break;
        }
        area /= 2;
        cout << setprecision(6) << area;
        cout << " " << num << endl;
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:29: error: cannot convert 'double*' to 'const int*'
   48 |         switch ( maxElement(dist, 4) ) {
      |                             ^~~~
      |                             |
      |                             double*
a.cc:4:34: note:   initializing argument 1 of 'int maxElement(const int*, size_t)'
    4 | static int maxElement(const int* array, size_t size)
      |                       ~~~~~~~~~~~^~~~~
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
      long W=sc.nextlong();
      long H=sc.nextlong();
      int x=sc.nextInt();
      int y=sc.nextInt();
      long total=W*H;
      if(x*H>y*W){
      System.out.println(total-x*H);
      System.out.println(0);
      }else if(x*H<y*W){
      System.out.println(total-y*W);
        System.out.println(0);
      }else{
      System.out.println(total-x*H);
      System.out.println(1);
      }
      
      
      
      
      
    }
}

Compiler output:
Main.java:5: error: cannot find symbol
      long W=sc.nextlong();
               ^
  symbol:   method nextlong()
  location: variable sc of type Scanner
Main.java:6: error: cannot find symbol
      long H=sc.nextlong();
               ^
  symbol:   method nextlong()
  location: variable sc of type Scanner
2 errors
Language: C++

#include <iostream>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    double n, m;
    double x, y;
    cin >> n >> m >> x >> y;
    cout << n * m / 2.0;
    if (n % 2 == 0 && x == n / 2 && 
        m % 2 == 0 && y == m / 2)
        cout << " 1";
    else
        cout << " 0";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   12 |     if (n % 2 == 0 && x == n / 2 &&
      |         ~ ^ ~
      |         |   |
      |         |   int
      |         double
a.cc:13:11: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   13 |         m % 2 == 0 && y == m / 2)
      |         ~ ^ ~
      |         |   |
      |         |   int
      |         double
Language: C++

#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
 
using namespace std;
 
typedef long long ll;
 
#define sz size()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(c) (c).begin(), (c).end()
#define rep(i,a,b) for(ll i=(a);i<(b);++i)
#define per(i,a,b) for(ll i=b-1LL;i>=(a);--i)
#define clr(a, b) memset((a), (b) ,sizeof(a))
#define ctos(c) string(1,c)
#define print(x) cout<<#x<<" = "<<x<<endl;
 
#define MOD 1000000007
 
int main() {
	ll w,h,x,y;
	cin>>w>>h>>x>>y;
	double area = 1.*w*h/2;
	ll flag = 0;
	if(w%2==0h%2==0&&&&w/2==x&&h/2==y){
		flag = 1;
	}
	printf("%20.20f %lld\n", area, flag);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:17: error: unable to find numeric literal operator 'operator""h'
   44 |         if(w%2==0h%2==0&&&&w/2==x&&h/2==y){
      |                 ^~
a.cc:44:29: error: invalid operands of types 'void*' and 'int' to binary 'operator/'
   44 |         if(w%2==0h%2==0&&&&w/2==x&&h/2==y){
      |                          ~~~^~
      |                          |   |
      |                          |   int
      |                          void*
a.cc:44:28: error: label 'w' used but not defined
   44 |         if(w%2==0h%2==0&&&&w/2==x&&h/2==y){
      |                            ^
Language: C++

#include <iostream>
#include <cmath>

using namespace std;

int main(){
  unsigned long long int W, H, x, y;
  cin >> W >> H >> x >> y;
  sprintf("%.10d",(long double)(W*H/2));
  if(x*2 == W && y*2 == H) cout << 1;
  else cout << 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
    9 |   sprintf("%.10d",(long double)(W*H/2));
      |           ^~~~~~~
a.cc:9:19: error: cannot convert 'long double' to 'const char*'
    9 |   sprintf("%.10d",(long double)(W*H/2));
      |                   ^~~~~~~~~~~~~~~~~~~~
      |                   |
      |                   long double
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 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/stdio.h:366:44: note:   initializing argument 2 of 'int sprintf(char*, const char*, ...)'
  366 |                     const char *__restrict __format, ...) __THROWNL;
      |                     ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: Java

import java.util.Scanner;
public class Main4 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int W = sc.nextInt();
		int H = sc.nextInt();
		int x = sc.nextInt();
		int y = sc.nextInt();

		long s = W*H;/*
		long s1 = W*y;
		long sy = Math.min(s1, s-s1);

		long s2 = H*x;
		long sx = Math.min(s2, s-s2);
		System.out.print(Math.max(sx, sy)+" ");*/

		System.out.print((W*H)/2.0+" ");
		if(W/2.0==x&&H/2.0==y)System.out.println(1);
		else System.out.println(0);
	}
}

Compiler output:
Main.java:2: error: class Main4 is public, should be declared in a file named Main4.java
public class Main4 {
       ^
1 error
Language: C++

#include<iostream>
#include <algorithm>
#include <string>
#include<vector>
#include<tuple>

//AtCoderC++.cpp

using namespace std;

template<typename T> void Show(const vector<vector<T>>& v, string delimiter = " ") {
	for (int i = 0; i < v.size(); i++) {
		for (int j = 0; j < v[i].size(); j++) {
			cout << v[i][j];
			if (j != v[i].size() - 1) {
				cout << delimiter;
			} else {
				cout << endl;
			}
		}
	}
}
template<typename T> void Show(const vector<T>& v, string delimiter = " ") {
	for (int i = 0; i < v.size(); i++) {
		cout << v[i];
		if (i != v.size() - 1) {
			cout << delimiter;
		} else {
			cout << endl;
		}
	}
}
template<typename T> vector<T> getUniform(T value, int n) {
	vector<vector<T>> ts;
	ts.resize(n);
	for (int i = 0; i < n; i++) {
		ts[i] = value;
	}
	return ts;
}
template<typename T> vector<vector<T>> getUniform(T value, int row, int col) {
	vector<vector<T>> ts;
	ts.resize(row);
	for (int i = 0; i < row; i++) {
		ts[i].resize(col);
		for (int j = 0; j < col; j++) {
			ts[i][j] = value;
		}
	}
	return ts;
}
bool All(vector<vector<bool>> ts) {
	int h = ts.size();
	int w = ts[0].size();
	for (int i = 0; i < h; i++)
		for (int j = 0; j < w; j++)
			if (!ts[i][j])return false;
	return true;
}

vector<string> split(string& content, char delim) {
	auto ss = vector<string>();
	string s = "";
	for (size_t i = 0; i < content.length(); i++) {
		if (content[i] == delim) {
			ss.push_back(s);
			s = "";
			continue;
		}
		s += content[i];
	}
	if (s != "")ss.push_back(s);
	return ss;
}

void solveB() {
	int N, X; cin >> N >> X;
	int D = 0;
	int l;
	int count = 0;
	for (size_t i = 0; i < N; i++) {
		if (X < D)break;
		count++;
		cin >> l;
		D += l;
	}
	cout << count << endl;
}

void solveC() {
	double W, H, x, y;
	cin >> W >> H >> x >> y;
	if (W / 2 == x && H / 2 == y) {
		cout << W * H / 2.0 << " " << 1 << endl;
		return;
	}
	if (W / 2 == x || H / 2 == y) {
		cout << W * H / 2.0 << " " << 0 << endl;
		return;
	}

	if (x == 0 || x == W || y == 0 || y == H || y / x == H / W || (H - y) / x == H / W) {
		cout << H * W / 2.0 << " " << 0 << endl;
		return ;
	}
	double min_w = min(x, W - x);
	double min_h = min(y, H - y);
	if (W > H) {
		cout << (W*min_h) << " " << 0 << endl;
		return ;
	} else if (W < H) {
		cout << (H*min_w) << " " << 0 << endl;
		return ;
	} else {
		cout << max(min_h, min_w) * H << " " << (min_h == min_w) ? 1 : 0 << endl;
		return;
	}
}


int main() {
	solveC();
}



Compiler output:
a.cc: In function 'void solveC()':
a.cc:115:82: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
  115 |                 cout << max(min_h, min_w) * H << " " << (min_h == min_w) ? 1 : 0 << endl;
      |                                                                                ~~^~~~~~~
Language: C++

//atcoder 130
#include <bits/stdc++.h>
using namespace std;
int main () {
	int W,H,x,y;
	double area;
	scanf("%d %d %d %d", &W, &H, &x, &y);
	area=double(W*H/2);
	if(abs(W-x)!=abs(x) && abs(H-y)!==abs(y)){
		printf("%.6lf 1\n",area);
	} else {
		printf("%.6lf 0\n",area);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:42: error: expected primary-expression before '=' token
    9 |         if(abs(W-x)!=abs(x) && abs(H-y)!==abs(y)){
      |                                          ^
Language: Java

import java.util.Scanner;
public class Main4 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int W = sc.nextInt();
		int H = sc.nextInt();
		int x = sc.nextInt();
		int y = sc.nextInt();

		long s = W*H;/*
		long s1 = W*y;
		long sy = Math.min(s1, s-s1);

		long s2 = H*x;
		long sx = Math.min(s2, s-s2);
		System.out.print(Math.max(sx, sy)+" ");*/

		System.out.print((W*H)/2.0+" ");
		if(W/2.0==x||H/2.0==y)System.out.println(1);
		else System.out.println(0);
	}
}

Compiler output:
Main.java:2: error: class Main4 is public, should be declared in a file named Main4.java
public class Main4 {
       ^
1 error
Language: C++

#include <cstdio>
#include <iostream>
using namespace std;
int W, H, x, y, flag;
double result;

int main()
{
    scanf("%d %d %d %d", &W, &H, &x, &y);
    if((H - y) * W == y * W)
        result = min(result, y * W);
    if((W - x) * H == x * H)
        result = min(result, x * H);
    if(W == H && x == y)
        result = min(result, (double)H * W / 2);
    if(x == 0 && y == 0 && W != H)
        result = min(result, (double)H * W / 2);

    if(result == y * W)
        flag++;
    if(result == x * H)
        flag++;
    if(result == (double)H * W / 2)
        flag++;
    flag--;
    if(flag >= 1)
        flag = 1;
    if(result == 987654321)
        flag = 0;
    printf("%0.6lf %d", result, flag);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: no matching function for call to 'min(double&, int)'
   11 |         result = min(result, y * W);
      |                  ~~~^~~~~~~~~~~~~~~
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:2:
/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:21: note:   deduced conflicting types for parameter 'const _Tp' ('double' and 'int')
   11 |         result = min(result, y * W);
      |                  ~~~^~~~~~~~~~~~~~~
/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:13:21: error: no matching function for call to 'min(double&, int)'
   13 |         result = min(result, x * H);
      |                  ~~~^~~~~~~~~~~~~~~
/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:13:21: note:   deduced conflicting types for parameter 'const _Tp' ('double' and 'int')
   13 |         result = min(result, x * H);
      |                  ~~~^~~~~~~~~~~~~~~
/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
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
    long W,H,x,y;
    cin >> W >> H >> x >> y;
    long areaHalf = (W*H)/2;

    // case 1 div x
    long minX = min(x,W-x);
    long area1 = minx * H;

    // case 2 div y
    long minY = min(y,H-y);
    long area2 = minY * W;
    
    // case 3 div x/y
    cout << areaHalf << endl;

    if(areaHalf == area1 || areaHalf == area2) cout << " 1" << endl;
    else if(W == H) cout << " 1" << endl;
    else cout << " 0" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: 'minx' was not declared in this scope; did you mean 'minX'?
   11 |     long area1 = minx * H;
      |                  ^~~~
      |                  minX
Language: C++

#include <iostream>
using namespace std;

int main()
{
   W, H, x, y;

  cin >> W >> H >> x >> y;

  double tmp1, tmp2;
  double area1, area2;

  tmp1 = x;
  tmp2 = W - x;

  if (tmp1 < tmp2){
    area1 = (double)tmp1 * H;
  }else {
    area1 = (double)tmp2 * H;
  }

  tmp1 = y;
  tmp2 = H - y;

  if (tmp1 < tmp2){
    area2 = (double)tmp1 * W;
  }else {
    area2 = (double)tmp2 * W;
  }

  if (area1 < area2){
    printf("%f ", area2);
  }else {
    printf("%f ", area1);
  }

  if (area1 == area2){
    cout << "1";
  }else {
    cout << "0";
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:4: error: 'W' was not declared in this scope
    6 |    W, H, x, y;
      |    ^
a.cc:6:7: error: 'H' was not declared in this scope
    6 |    W, H, x, y;
      |       ^
a.cc:6:10: error: 'x' was not declared in this scope
    6 |    W, H, x, y;
      |          ^
a.cc:6:13: error: 'y' was not declared in this scope
    6 |    W, H, x, y;
      |             ^
Language: C

#include <stdio.h>

int main()

{

    long long int x, y, X, Y;

    scanf("%lld %lld %lld %lld", &x, &y, &X, &Y);

    long double z, b;

    z = x * y / 2;

    b = y / x;

    if (X == x / 2 && Y == y / 2)

        printf("%lf 1\n", z);

    else if (X == x / 2 && Y / X == y / x || Y = y / 2 && Y / X == y / x)

        printf("%lf 1\n", z);

    else

        printf("%lf 0\n", z);

    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:21:48: error: lvalue required as left operand of assignment
   21 |     else if (X == x / 2 && Y / X == y / x || Y = y / 2 && Y / X == y / x)
      |                                                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  float W;
  float H;
  float x;
  float y;
  float S;
  bool judge = 0;
  cin >> W;
  cin >> H;
  cin >> x;
  cin >> y;
  if(W/2 == x && H/2 == y)
  {judge = 1;}
  W*H/2=S
  cout << S << " "<< judge <<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:6: error: lvalue required as left operand of assignment
   17 |   W*H/2=S
      |   ~~~^~
Language: C++

using namespace std;

int main(){
    double w,h,x,y,z;
    cin >> w;
    cin >> h;
    cin >> x;
    cin >> y;
    z=w*h/2;
    printf("%.6f",z);
    if(x==w/2,y==h/2){
        cout<<1<<endl;
    }
    else{
        cout<<0<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> w;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:10:5: error: 'printf' was not declared in this scope
   10 |     printf("%.6f",z);
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | using namespace std;
a.cc:12:9: error: 'cout' was not declared in this scope
   12 |         cout<<1<<endl;
      |         ^~~~
a.cc:12:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:18: error: 'endl' was not declared in this scope
   12 |         cout<<1<<endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:15:9: error: 'cout' was not declared in this scope
   15 |         cout<<0<<endl;
      |         ^~~~
a.cc:15:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:18: error: 'endl' was not declared in this scope
   15 |         cout<<0<<endl;
      |                  ^~~~
a.cc:15:18: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C

#include<stdio.h>

int main(void){
    double w, h, a, b;
    scanf("%lf %lf %lf %lf", &w, &h, &a, &b);

    double s[5], max=0;
    int another=0, i=0;

    if(a == w/2.0 || b == h/2.0 || a == b){
        printf("%lf", w*h/2.0);
        if(a == w/2.0 && b == h/2.0) printf("%d", 1);
        else printf("%d", 0);
    }else {
        if( (double)a > w/2.0 )a = w - a;
        if( (double)b > h/2.0 )b = h - b;
        s[0] = a*h;
        s[1] = b*w;
        s[2] = (a*h*h)/( 2.0*(h-b) );
        s[3] = (b*w*w)/( 2.0(w-a) );
        s[4] = (a+b)*(a+b)/2.0;
        max = s[0];
        for(i=1; i<5; i++){
            if(max < s[i]){
                max = s[i];
                another = 0;
            }else if(max ==s[i]) another = 1;

            printf("%lf, %d", max, another);
        }
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:26: error: called object is not a function or function pointer
   20 |         s[3] = (b*w*w)/( 2.0(w-a) );
      |                          ^~~
Language: C++

#include <iostream>
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>

using namespace std;
#define REP(i,n) FOR(i,0,n)
#define FOR(i,a,b) for(long long i=(a),i##Len_=(b);i<i##Len_;i++)
typedef long long ll;

int main()
{
    ll W,H,x,y;
    int res;
    cin >> W >> H >> x >> y;

    //xで割ったときの最大値(ちいさいほうをとる)
    //対角線

    if( W % x == 0 && H % y == 0)
    {
        if(W /x == 2 && H /y == 2)res = 1;
        else res = 0;

        m = W * H / 2;

        printf("%.9f %d\n",m,res);
        return 0;
    }

    double mx = 0;
    //xが0, またはWノバイ
    if(x == 0.0 || x == W)
    {
        mx = W * H;
    }
    else if(W - x < x)
    {
        mx = (W - x) * H;
    }
    else mx = x * H;

    //yで分けたときの最大値

    double my;
    //yが0, またはHノバイ
    if(y == 0.0 || y == H)
    {
        my = W * H;
    }
    else if(H - y < y)//逆
    {
        my = W * (H - y);
    }
    else my = W * y;

    if(mx == my)res = 1;
    else res = 0;

    double m;

    m = max(mx,my);

    //cout << m <<  " " << res <<  endl;

    printf("%.9f %d\n",m,res);
    return 0;


}



Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'm' was not declared in this scope
   25 |         m = W * H / 2;
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

//vector…可変長、データの大きさに合わせてサイズを変える
//list…双方向リスト、要素を挿入、削除の多いとき
//forward_list
//array…固定長配列
//set…集合
//multiset
//bitset…2進数、固定長ビット列
//map…連想配列、キーと値を関連付ける
//multimap
//deque
//stack…FILO
//queue…FIFO
//priority_queue…格納された最大値から順に取り出す
//pair…二つの値を一組
//tuple…複数の値を一組

template<typename T>
void remove(std::vector<T>& vector, char index) {
    vector.erase(vector.begin() + index);
}

template<class T>
T ma(std::vector<T> &v) {
    T maxi = 0;
    for(auto &i:v) maxi = max(maxi, i);
    return maxi;
}

template<class T>
T mi(std::vector<T> &v) {
    T mini = 0;
    for(auto &i:v) mini = min(mini, i);
    return mini;
}

template <class T>
T pow(T x, T y, T n = numeric_limits<T>::max()) {
    if(y == 0) return 1;
    if(y % 2 == 0) return pow((x * x) % n, y / 2);
    return (x * pow(x, y - 1)) % n;
}

#define rep(i, n, m) for (int i = n; i <= m; i++)
#define Rep(i, n, m) for (int i = m; i >= 1; i--)

typedef long long ll;
typedef unsigned long long ull;

/*
int gcd(int x, int y) {
    if (x < y) swap(x, y);
    return !y ? x : gcd(x % y, y);
}
*/
int main() {
    int w, h, x, y;
    cin >> w >> h >> x >> y;

    int p = (w-x) > x ? (w-x+1) : x;
    int q = (h-y) > y ? (h-y+1) : y;

    vector<double> areal;
    vector<double> arear;

    areal.push_back(w*y);
    areal.push_back(w*(h-y));
    arear.push_back(x*h);
    arear.push_back((w-x)*h);

    double ans = min(max(areal[0], areal[1]), max(arear[0], arear[1]));

    int cnt = 0;

    cout << ans << ' ';

    double p = w / x;
    double q = h / y;

    if (p == q) cout << 1 << endl;
    else cout << 0 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:79:12: error: conflicting declaration 'double p'
   79 |     double p = w / x;
      |            ^
a.cc:62:9: note: previous declaration as 'int p'
   62 |     int p = (w-x) > x ? (w-x+1) : x;
      |         ^
a.cc:80:12: error: conflicting declaration 'double q'
   80 |     double q = h / y;
      |            ^
a.cc:63:9: note: previous declaration as 'int q'
   63 |     int q = (h-y) > y ? (h-y+1) : y;
      |         ^
Language: Java

import java.io.*;
import java.util.*;

class test {
  public static void main (String [] args) throws IOException {
       Scanner sc= new Scanner (System.in());
     int W= sc.nextInt();
     int H= sc.nextInt();
     int x= sc.nextInt();
     int y= sc.nextInt();
    double half =(W*H)/2;
    System.out.print(half);
    if(2*x==W && 2*y==H)System.out.print(" "+ 1);
    else System.out.print(" " +0);

  }
  
}

Compiler output:
Main.java:6: error: cannot find symbol
       Scanner sc= new Scanner (System.in());
                                      ^
  symbol:   method in()
  location: class System
1 error
Language: Java

import java.io.*;

public class C{
    public static void Main(String args[]) throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] array = br.readLine().split(" ");

        int w = Integer.parseInt(array[0]);
        int h = Integer.parseInt(array[1]);
        int x = Integer.parseInt(array[2]);
        int y = Integer.parseInt(array[3]);

        //Xを使う
        int X1 = x * h;
        int X2 = (w-x) * h;

        //Yを使う
        int Y1 = y * w;
        int Y2 = (h-y) * w;

        int Xmin;
        int Ymin;
        //Xを決める
        if(X1 <= X2){
            Xmin = X1;
        }else{
            Xmin = X2;
        }
        //Yを決める
        if(Y1 <= Y2){
            Ymin = Y1;
        }else{
            Ymin = Y2;
        }

        if(Xmin <= Ymin){
            System.out.print((double)Ymin + " ");
            System.out.println(1);
        }else{
            System.out.print((double)Xmin + " ");
            System.out.println(0);
        }
    }
}

Compiler output:
Main.java:3: error: class C is public, should be declared in a file named C.java
public class C{
       ^
1 error
Language: Java

import java.io.*;
import java.util.*;

class test {
  public static void main (String [] args) throws IOException {
       Scanner sc= new Scanner (System.in());
     int W= sc.nextInt();
     int H= sc.nextInt();
     int x= sc.nextInt();
     int y= sc.nextInt();
    double half =(W*H)/2;
    System.out.print(half);
    if(2*x==W && 2*y==H System.out.print(" "+ 1);
    else System.out.print(" " +0);

  }
  
}

Compiler output:
Main.java:13: error: ')' expected
    if(2*x==W && 2*y==H System.out.print(" "+ 1);
                       ^
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
    float w, h, x, y;
    cin >> w >> h >> x >> y;

    float max;
    max = w * h;

    float a, b, c, d;
    a = x * y;
    b = x + (h -y);
    c = (w -x) * (h-y);
    d = (w -x) * y;

    if(w == x*2 && h == y*2){
        cout << setprecision(7) << b << " " << 1 << endl;
    }
    else{
        if(x <= w/2 && y > h/2){
            cout << setprecision(6) << max(a+b, b+c) << " " << 0 << endl;
        }
        else if(x <= w/2 && y <= h/2){
            cout <<  setprecision(6) << max(a+b, a+d) << " " << 0 << endl;
        }
        else if(x > w/2 && y > h/2){
            cout <<  setprecision(6) << max(c+b, d+c) << " " << 0 << endl;
        }
        else if(x >= w/2 && y <= h/2){
            cout <<  setprecision(6) << max(a+d, c+d) << " " << 0 << endl;
        }

    }


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:43: error: 'max' cannot be used as a function
   23 |             cout << setprecision(6) << max(a+b, b+c) << " " << 0 << endl;
      |                                        ~~~^~~~~~~~~~
a.cc:26:44: error: 'max' cannot be used as a function
   26 |             cout <<  setprecision(6) << max(a+b, a+d) << " " << 0 << endl;
      |                                         ~~~^~~~~~~~~~
a.cc:29:44: error: 'max' cannot be used as a function
   29 |             cout <<  setprecision(6) << max(c+b, d+c) << " " << 0 << endl;
      |                                         ~~~^~~~~~~~~~
a.cc:32:44: error: 'max' cannot be used as a function
   32 |             cout <<  setprecision(6) << max(a+d, c+d) << " " << 0 << endl;
      |                                         ~~~^~~~~~~~~~
Language: C++

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;

int main(){
    double w, h, x, y;
    cin >> w >> h >> x >> y;

    printf("%f ",w*h/2);


    if (x == w/2 && y == h/2) cout << "1\n";
    else if ((x == 0 || x == w) && (y == 0 || y == h)) cout << "0\n";
    else if (x == w/2 && (y == 0 || y == h/2)) cout << "0\n";
    else if (y == h/2 && (x == 0 || x == w/2)) cout << "0\n";
    else if (x == w/2 || y == h/2)  cout << "1\n";
    else cout << "0\n";

    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:20:14: error: expected '}' at end of input
   20 |     return 0;
      |              ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: Java

import java.util.*;

public class C{

    public static void main(String args[]){

        // スキャナーの宣言
        Scanner sc = new Scanner(System.in);
        // 整数の入力
		int w = sc.nextInt();
        // スペース区切りの整数の入力
        int h = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();

        double ans;
        double a = 0.0, b = 0.0;
        int c = 0;

        if((x == 0 || x == w) && (y == 0 || y == h)){
            a = w * h / 2.0; b = w * h / 2.0;
            c = 1;
        }else if(x == 0 || x == w){
            a = Math.min(x * h, (w - x) * h); b = Math.min(w * y, w * (h - y)); //a0
            c = 0;
        }else if(y == 0 || y == h){
            a = Math.min(x * h, (w - x) * h); Math.min(w * y, w * (h - y)); //b0
            c = 0;
        }else{
            a = Math.min(x * h, (w - x) * h); b = Math.min(w * y, w * (h - y));
            if(a == b) c = 1;
        }
        ans = Math.max(a, b);

        // 出力
        System.out.println(String.format("%.9f", ans) + " " + c);

    }

}


Compiler output:
Main.java:3: error: class C is public, should be declared in a file named C.java
public class C{
       ^
1 error
Language: Java

import java.util.*;

public class Main{

    public static void main(String args[]){

        // スキャナーの宣言
        Scanner sc = new Scanner(System.in);
        // 整数の入力
		int w = sc.nextInt();
        // スペース区切りの整数の入力
        int h = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();

        double ans;
        double a = 0.0, b = 0.0
        int c = 0;

        if((x == 0 || x == w) && (y == 0 || y == h)){
            a = w * h / 2.0; b = w * h / 2.0;
            c = 1;
        }else if(x == 0 || x == w){
            a = Math.min(x * h, (w - x) * h); b = Math.min(w * y, w * (h - y)); //a0
            c = 0;
        }else if(y == 0 || y == h){
            a = Math.min(x * h, (w - x) * h); Math.min(w * y, w * (h - y)); //b0
            c = 0;
        }else{
            a = Math.min(x * h, (w - x) * h); b = Math.min(w * y, w * (h - y));
            if(a == b) c = 1;
        }
        ans = Math.max(a, b);

        // 出力
        System.out.println(String.format("%.9f", ans) + " " + c);

    }

}


Compiler output:
Main.java:17: error: ';' expected
        double a = 0.0, b = 0.0
                               ^
1 error
Language: C++

#include <algorithm>
#include <cmath>
#include <climits>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define DEBUG 1
constexpr int kMod = 1000000007;
typedef long long LL;

int main() {
  LL W, H, x, y; std::cin >> W >> H >> x >> y;

  LL X = (y < H - y) ? y * W
                     : (H - y) * W;
  LL Y = (x < W - x) ? x * H
                     : (W - x) * H;

  if (y == H - y && x == W - x) {
    double ans = y * W;
    printf("%.9f 1\n", ans);
    assert(false);
  } else {
    double ans = std::max(X, Y);
    printf("%.9f 0\n", ans);
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:5: error: 'assert' was not declared in this scope
   26 |     assert(false);
      |     ^~~~~~
a.cc:9:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
    8 | #include <set>
  +++ |+#include <cassert>
    9 | #include <string>
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <algorithm>
#include <map>
#include <string>
#include <cmath>
#include <set>
#include <utility>

#define mod 1000000007

using namespace std;
 
int main(void){
	
	int W, H, x, y;
	double s1[2], s2[2], smax1, smax2, max;
	int num = 0;
	
	cin >> W >> H >> x >> y;
	
	s1[0] = (double)(x*H);
	s1[1] = (double)((W-x)*H);
	
	s2[0] = (double)((H-y)*W);
	s2[1] = (double)(y*W);
	
	sort(s1, s1+2);
	sort(s2, s2+2);
	
	if(s1[0] > s2[0]){
		max = s1[0];
	}else if(s2[0] > s1[0]){
		max = s2[0];
	}else if(s2[0] == s1[0]){
		max = s2[0];
		num = 1; 
	}
	
	if(2*x == W || 2*y == H)
		num = 1;
	
	if(x == W){
		printf("%.10f %d", max((double)(W*(H-y)), (double)(W*y)), 0);
		return 0;
	}else if(y == H){
		printf("%.10f %d", max((double)(H*(W-x)), (double)(H*x)), 0);
		return 0;
	}
		
	
	printf("%.10f %d", max, num);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:39: error: 'max' cannot be used as a function
   44 |                 printf("%.10f %d", max((double)(W*(H-y)), (double)(W*y)), 0);
      |                                    ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:47:39: error: 'max' cannot be used as a function
   47 |                 printf("%.10f %d", max((double)(H*(W-x)), (double)(H*x)), 0);
      |                                    ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>

using namespace std;
#define REP(i,n) FOR(i,0,n)
#define FOR(i,a,b) for(long long i=(a),i##Len_=(b);i<i##Len_;i++)
typedef long long ll;

int main()
{
    double W,H,x,y;
    int res;
    cin >> W >> H >> x >> y;

    //xで割ったときの最大値(ちいさいほうをとる)
    //対角線

    if( W % x == 0 && H % y == 0)
    {
        if(W /x == 2 && H /y == 2)res = 1;
        else res = 0;

        m = W * H / 2;

        printf("%.9f %d\n",m,res);
        return 0;
    }

    double mx = 0;
    //xが0, またはWノバイ
    if(x == 0.0 || x == W)
    {
        mx = W * H;
    }
    else if(W - x < x)
    {
        mx = (W - x) * H;
    }
    else mx = x * H;

    //yで分けたときの最大値

    double my;
    //yが0, またはHノバイ
    if(y == 0.0 || y == H)
    {
        my = W * H;
    }
    else if(H - y < y)//逆
    {
        my = W * (H - y);
    }
    else my = W * y;

    if(mx == my)res = 1;
    else res = 0;

    double m;

    m = max(mx,my);

    //cout << m <<  " " << res <<  endl;

    printf("%.9f %d\n",m,res);
    return 0;


}



Compiler output:
a.cc: In function 'int main()':
a.cc:20:11: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   20 |     if( W % x == 0 && H % y == 0)
      |         ~ ^ ~
      |         |   |
      |         |   double
      |         double
a.cc:20:25: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   20 |     if( W % x == 0 && H % y == 0)
      |                       ~ ^ ~
      |                       |   |
      |                       |   double
      |                       double
a.cc:25:9: error: 'm' was not declared in this scope
   25 |         m = W * H / 2;
      |         ^
Language: C++

#include<bits/stdc++.h> 
#include<cstdio>
int W,H,x,y;
using namespace std;
int main(){
 I cannot do this;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:2: error: 'I' was not declared in this scope
    6 |  I cannot do this;
      |  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int W,H,x,y;
  if((2*x==W)||(2*y=H)){
   cout << W*H/2; 
  }
  if((y*W==x*H)||(y*W==H*(W-x))){
   cout << W*H/2; 
  }  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: lvalue required as left operand of assignment
    6 |   if((2*x==W)||(2*y=H)){
      |                 ~^~
Language: C++

#include <iostream>
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>

using namespace std;
#define REP(i,n) FOR(i,0,n)
#define FOR(i,a,b) for(long long i=(a),i##Len_=(b);i<i##Len_;i++)
typedef long long ll;

int main()
{
    double W,H,x,y;
    int res;
    cin >> W >> H >> x >> y;

    //xで割ったときの最大値(ちいさいほうをとる)
    //対角線

    if( W % x == 0 && H % y == 0)
    {
        if(W /x == 2 && H /y == 2)res = 1;
        else res = 0;;

        m = W * H / 2

        printf("%.9f %d\n",m,res);
        return 0;
    }

    double mx = 0;
    //xが0, またはWノバイ
    if(x == 0.0 || x == W)
    {
        mx = W * H;
    }
    else if(W - x < x)
    {
        mx = (W - x) * H;
    }
    else mx = x * H;

    //yで分けたときの最大値

    double my;
    //yが0, またはHノバイ
    if(y == 0.0 || y == H)
    {
        my = W * H;
    }
    else if(H - y < y)//逆
    {
        my = W * (H - y);
    }
    else my = W * y;

    if(mx == my)res = 1;
    else res = 0;

    double m;

    m = max(mx,my);

    //cout << m <<  " " << res <<  endl;

    printf("%.9f %d\n",m,res);
    return 0;


}



Compiler output:
a.cc: In function 'int main()':
a.cc:20:11: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   20 |     if( W % x == 0 && H % y == 0)
      |         ~ ^ ~
      |         |   |
      |         |   double
      |         double
a.cc:20:25: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   20 |     if( W % x == 0 && H % y == 0)
      |                       ~ ^ ~
      |                       |   |
      |                       |   double
      |                       double
a.cc:25:9: error: 'm' was not declared in this scope
   25 |         m = W * H / 2
      |         ^
Language: C++

using namespace std;

int main(){
    double w,h,x,y;
    cin >> w;
    cin >> h;
    cin >> x;
    cin >> y;
    cout << w*h/2 <<endl;
    if(x==w/2,y==h/2){
        cout<<1<<endl;
    }
    else{
        cout<<0<<endl;
    }
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> w;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout << w*h/2 <<endl;
      |     ^~~~
a.cc:9:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:21: error: 'endl' was not declared in this scope
    9 |     cout << w*h/2 <<endl;
      |                     ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++


#include <iostream>
int main(){
float a,b,c,d;
cin>>a>>b>>c>>d;
float ans=a*b/2;
int tf=1;
if(2*c==a&&2*d==b)tf=0;
cout<<ans<<" "<<tf<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 | cin>>a>>b>>c>>d;
      | ^~~
      | std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 | cout<<ans<<" "<<tf<<endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 | cout<<ans<<" "<<tf<<endl;
      |                     ^~~~
      |                     std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int W,H,x,y;
  cin >> W >> H >> x >> y;
  double S=W*H/2;
  if (x==W/2 && y==H/2){
   int s=1;
  }
  else{
   int s=0;
  }
  cout << S << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: 's' was not declared in this scope
   13 |   cout << S << s << endl;
      |                ^
Language: C

#pragma warning(disable: 4996)
#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#include <set>
#include <map>
#define MOD 1000000007

using namespace std;

int W, H, x, y;

int main() {

	//
	scanf("%d %d %d %d", &W, &H, &x, &y);

	double area = W * H / 2;
	int answer = 0;
	if(W / 2 == x) {
		answer++;
	}
	if(H / 2 == y) {
		answer++;
	}
	if(answer - 1 >= 1)
		printf("%lf %d", area, answer - 1);
	else
		printf("%lf %d", area, 0);

	//cout << area << " " << answer - 1;

	return 0;
}




Compiler output:
main.c:3:10: fatal error: algorithm: No such file or directory
    3 | #include <algorithm>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
int main(){
  int a,b,c,d,check,check2,other,other2,ans,ans2=0;
  scanf("%d",&a);
  scanf("%d",&b);
  scanf("%d",&c);
  scanf("%d",&d);
  
  check = (a-c)*b;
  other = a*b-check;
  check2 = (b-d)*a;
  other2 = a*b-check2;
  
  if(check>=other){
    check = other;
  }
  if(check2>=other2){
    check2 = other2
  }
  if(check>=check2){
    ans = check2;
  }
  if(check<check2){
    ans = check;
  }
  
  if(check==check2){
    ans2 = 1;
  }
  printf("%d %d",ans,ans2);
  return 0;
}
    
    
    
  
  



Compiler output:
main.c: In function 'main':
main.c:18:20: error: expected ';' before '}' token
   18 |     check2 = other2
      |                    ^
      |                    ;
   19 |   }
      |   ~
Language: C++

#include <stdio.h>
#include <iostream>
#include <math.h>
#include <iomanip>
using namespace std;

int main()
{
    unsigned long long w, h, x, y;
    unsigned long long sq1, sq2, sq3, sq4;
    cin >> w >> h >> x >> y;

    sq1 = x * h;
    sq2 = (w - x) * h;
    sq3 = (h - y) * w;
    sq4 = y * w;

    if (max(sq1, sq2) == max(sq3, sq4))
    {
        printf("%.10f 0\n", w * h - (double)max({sq1, sq2, sq3, sq4}));
    }
    else
    {
        if (max(sq1, sq2) > max(sq3, sq4))
        {  
            printf("%.10f 0\n",(double)max(sq3, sq4));
        }
        else
        {
            printf("%.10f 0\n", (double)max(sq1, sq2));
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:48: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   20 |         printf("%.10f 0\n", w * h - (double)max({sq1, sq2, sq3, sq4}));
      |                                             ~~~^~~~~~~~~~~~~~~~~~~~~~
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:2:
/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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
Language: C

#include <stdio.h>
int main(){
  int a,b,c,d,check,check2,other,other2,ans,ans2=0;
  scanf("%d",&a);
  scanf("%d",&b);
  scanf("%d",&c);
  scanf("%d",&d);
  
  check = (a-c)*b;
  other = a*b-check
  check2 = (b-d)*a;
  other2 = a*b-check2
  
  if(check>=other){
    check = other;
  }
  if(check2>=other2){
    check2 = other2
  }
  if(check>=check2){
    ans = check2;
  }
  if(check<check2){
    ans = check;
  }
  
  if(check==check2){
    ans2 = 1;
  }
  printf("%d %d",ans,ans2);
  return 0;
}
    
    
    
  
  



Compiler output:
main.c: In function 'main':
main.c:10:20: error: expected ';' before 'check2'
   10 |   other = a*b-check
      |                    ^
      |                    ;
   11 |   check2 = (b-d)*a;
      |   ~~~~~~            
main.c:12:22: error: expected ';' before 'if'
   12 |   other2 = a*b-check2
      |                      ^
      |                      ;
   13 | 
   14 |   if(check>=other){
      |   ~~
Language: C++

#include<bits/stdc++.h>
#include<boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecision;
#define BEGIN ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define END return EXIT_SUCCESS
#define rep(I,N) for(auto I=0;I<(N);++I)
#define up(I,A,B) for(auto I=(A);I<=(B);++I)
#define dw(I,A,B) for(auto I=(A);I>=(B);--I)
#define all(C) (C).begin(),(C).end()
#define rall(C) (C).rbegin(),(C).rend()
#define ft first
#define sd second
#define mp make_pair
#define mt make_tuple
#define pf push_front
#define pb push_back
#define pt pop_front
#define pk pop_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define rs resize
template<class T> T count_bit(T p){
  if(typeid(p)==typeid(int))return __builtin_popcount(p);
  else if(typeid(p)==typeid(long))return __builtin_popcountl(p);
  else return __builtin_popcountll(p);
}
template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;}
template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;}
template<class T>inline void                                      in(T &p){cin>>p;}
template<class T1,class T2>inline void                            in(T1 &p1,T2 &p2){cin>>p1>>p2;}
template<class T1,class T2,class T3>inline void                   in(T1 &p1,T2 &p2,T3 &p3){cin>>p1>>p2>>p3;}
template<class T1,class T2,class T3,class T4>inline void          in(T1 &p1,T2 &p2,T3 &p3,T4 &p4){cin>>p1>>p2>>p3>>p4;}
template<class T1,class T2,class T3,class T4,class T5>inline void in(T1 &p1,T2 &p2,T3 &p3,T4 &p4,T5 &p5){cin>>p1>>p2>>p3>>p4>>p5;}
template<class T>inline void                                      ins(T &p){for_each(all(p),in<decltype(p[0])>);}
template<class T>inline void                             out(T p){cout<<p<<endl;}
template<class T1,class T2>inline void                   out(T1 p1,T2 p2){cout<<p1<<" "<<p2<<endl;}
template<class T1,class T2,class T3>inline void          out(T1 p1,T2 p2,T3 p3){cout<<p1<<" "<<p2<<" "<<p3<<endl;}
template<class T1,class T2,class T3,class T4>inline void out(T1 p1,T2 p2,T3 p3,T4 p4){cout<<p1<<" "<<p2<<" "<<p3<<" "<<p4<<endl;}
inline                                              void out(double p){printf("%.10f\n",p);}
template<class T>inline                             void outs(T p){for_each(all(p),out<decltype(p[0])>);}

inline void solve(void){
  double W,H,X,Y,EPS=1e-10;
  in(W,H,X,Y);
  if(X>W/2&&Y>H/2)printf("%.10f ",(W-X-Y+H)*(H+W-X-Y)*0.5);
  else if(X<W/2&&Y<H/2)printf("%.10f ",(X+Y)*(X+Y)*0.5);
  else if(X>W/2&&Y<H/2)printf("%.10f ",(W-X+Y)*(W+Y-X)*0.5);
  else if(X<W/2&&Y>H/2)printf("%.10f ",(H+X-Y)*(H-Y+X)*0.5);
  else printf("%.10f ",max(min(W*Y,W*(H-Y)),min(X*H,(W-X)*H)));
  if(abs(X-W/2)<EPS&&abs(Y-H/2)<EPS)puts(1);
  else puts(0);
}
int main(int argc,char**argv){
  BEGIN;
  solve();
  END;
}


Compiler output:
a.cc:2:9: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
    2 | #include<boost/multiprecision/cpp_int.hpp>
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.