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

#include <iostream>
#include <cstdlib>

int main()
{
    long long w, h, x, y;
    std::cin >> w >> h >> x >> y;
    
    double area = 0.0;
    bool isAlt;
    
    if ((x == w/2.0) && (y == h/2.0)) {
        area = w*h*0.5;
        isAlt = true;
    }
    else if ((x == w/2.0) && (y != h/2.0)) { 
        area = w*h*0.5;
        isAlt = false;
    }
    else if ((x != w/2.0) && (y == h/2.0)) { 
        area = w*h*0.5;
        isAlt = false;
    } else if ((x == w) | (y == h)) {
        area = w*h*0.5;
        isAlt = false;
    else {
        area = w*h*0.5;
        isAlt = true;
    }

    
    int res = isAlt ? 1 : 0;
    
    std::cout << area << " " << res;
    
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:26:5: error: expected '}' before 'else'
   26 |     else {
      |     ^~~~
a.cc:23:37: note: to match this '{'
   23 |     } else if ((x == w) | (y == h)) {
      |                                     ^
Language: C

#include <stdio.h>

int main() {
	float w=0, h=0, x=0, y=0, ans = 0;
	scanf_s("%f %f %f %f", &w, &h, &x, &y);
	float s[4] = { 0,0,0,0 };
	float big[2] = { 0,0 };

	s[0] = x * h;
	s[1] = (w - x) * h;
	
	if (s[0] > s[1] ) {
		big[0] = s[1];
	}
	else {
		big[0] = s[0];
	}

	//printf("%f 0", big[0]);

	s[2] = y * w;
	s[3] = (h - y) * w;
	if (s[2] > s[3]) {
		big[1] = s[3];
	}
	else {
		big[1] = s[2];
	}

	//printf("%f 0", big[1]);

	if (big[0] > big[1]) {
		printf("%f 0",big[0]);
	}
	else if (big[0] == big[1]) {
		printf("%f 1", big[0]);
	}
	else {
		printf("%f 0", big[1]);
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |         scanf_s("%f %f %f %f", &w, &h, &x, &y);
      |         ^~~~~~~
      |         scanf
Language: C++

#pragma once
#include "stdafx.h"
#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 << min_w * H << " " << 1 << endl;
		return ;
	}
}

void solveD() {
	long long N, K; cin >> N >> K;
	auto vs = vector<long long>(N);
	cin >> vs[0];
	int a;
	for (size_t i = 1; i < N; i++) {
		cin >> a;
		vs[i] = a + vs[i - 1];
	}
}

int main() {
	solveC();
}



Compiler output:
a.cc:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
a.cc:2:10: fatal error: stdafx.h: No such file or directory
    2 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
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.
Language: C++

#include<iostream>
using namespace std;
int main(){
  int w, h, x, y;
  cin >> w >> h >> x >> y;
  float ans;
  ans = w*h/2;
  cout << ans;
  if(w % 2 =0 && h %2 =0 && x = w/2 && y = h/2){
      cout << 1;
    }else{
      cout << 0;
  }
}  
     


Compiler output:
a.cc: In function 'int main()':
a.cc:9:37: error: lvalue required as left operand of assignment
    9 |   if(w % 2 =0 && h %2 =0 && x = w/2 && y = h/2){
      |                                 ~~~~^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int w h x y;
  cin >> w >> h >> x >> y;
  float ans;
  ans = w*h/2;
  cout << ans;
  if(w % 2 =0 && h %2 =0 && x = w/2 && y = h/2){
      cout << 1;
    }else{
      cout << 0;
  }
}  
     

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: expected initializer before 'h'
    4 |   int w h x y;
      |         ^
a.cc:5:10: error: 'w' was not declared in this scope
    5 |   cin >> w >> h >> x >> y;
      |          ^
a.cc:5:15: error: 'h' was not declared in this scope
    5 |   cin >> w >> h >> x >> y;
      |               ^
a.cc:5:20: error: 'x' was not declared in this scope
    5 |   cin >> w >> h >> x >> y;
      |                    ^
a.cc:5:25: error: 'y' was not declared in this scope
    5 |   cin >> w >> h >> x >> y;
      |                         ^
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();
        int ans = 0;
        double w2 = w /2.0;
        double h2 = h /2.0;
		if ((x == w2) && (y == h2)) {
        	ans = 1;
        }
        double s = w * h / 2;
		System.out.println(s, ans);
	}
}

Compiler output:
Main.java:16: error: no suitable method found for println(double,int)
		System.out.println(s, ans);
		          ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: C++

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

int main(){
    double w, h, x, y;
    cin >> w >> h >> x >> y;
    if((w*y == h*x || (w-x)*y == h*x) && x != 0 x != w && y != 0 && y != w){
        printf("%.9lf 1", h*w/2);
    }else{
        printf("%.9lf 0", h*w/2);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:48: error: expected ')' before 'x'
    7 |     if((w*y == h*x || (w-x)*y == h*x) && x != 0 x != w && y != 0 && y != w){
      |       ~                                        ^~
      |                                                )
Language: C++

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

int main(){
	double W, H, x, y;
	cin >> W >> H >> x >> y;
	
	double tetra = W * H;
	
	cout << tetra / 2 << ' ';
	
	if( x == W / 2 && y == H / 2 ){
		cout << 1 <, endl;
	}
	
	else if( x * H == y * W ){
		cout << 0 << endl;
	}
	
	else if( x * H == y * W * (-1) ){
		cout << 0 << endl;
	}
	
	else if( x == W / 2 ){
		cout << 0 << endl;
	}
	
	else if( y == H / 2 ){
		cout << 0 << endl;
	}
	
	else{
		cout << 1 << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: expected primary-expression before ',' token
   13 |                 cout << 1 <, endl;
      |                            ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <iomanip>
#include <climits>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
ll INF=LLONG_MAX;


int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	ll w,h,x,y;
	cin>>w>>h>>x>>y;
	long double t=2.0;
	long double ans=w*h/t;

	if(w%2==0 && h2==0){
		if(x==w/2 && y==h/2){
			cout<<ans<<" "<<1<<endl;
		}else{
			cout<<ans<<" "<<0<<endl;
		}
	}else{
		cout<<ans<<" "<<0<<endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:22: error: 'h2' was not declared in this scope; did you mean 'h'?
   21 |         if(w%2==0 && h2==0){
      |                      ^~
      |                      h
Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <string>
using namespace std;
int main(void){
    int f=0;
    double ans;
    long long w,h,x,y;
    cin>>w>>h>>x>>y;
    ans=max(min((double)(w-x)*h,(double)x*h),min((double)(w*(h-y),(double)w*y));
    if(w==h)f=1;
    printf("%.9f",ans);
    cout<<" "<<f<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:49: error: no matching function for call to 'min(double)'
   12 |     ans=max(min((double)(w-x)*h,(double)x*h),min((double)(w*(h-y),(double)w*y));
      |                                              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:   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,
                 from a.cc:4:
/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:
a.cc:12:49: note:   mismatched types 'std::initializer_list<_Tp>' and 'double'
   12 |     ans=max(min((double)(w-x)*h,(double)x*h),min((double)(w*(h-y),(double)w*y));
      |                                              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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
Language: C++

fun main(args : Array<String>) {
    val (W, H, x1, y1) = readLine()!!.split(" ").map { it.toDouble() }

    val candidates = mutableListOf<Double>()
    // y = m(x - x1) + y1
    // m = 1のときの直線・・・
    val s1 = Math.min(H * x1, H * (W -x1))
    if (s1 != 0.0) {
        candidates.add(s1)
    }
    // m = 0 (fix y)
    val s3 = Math.min(W * y1, W * (H -y1))
    if (s3 != 0.0) {
        candidates.add(s1)
    }

    // case (W, 0), (x1, y1)
    if (W -x1 != 0.0) {
        /*
        val yA = fun(x: Double) : Double {
            return m * (x - x1) + y1
        }
        */
        val m = (0 -y1) / (W - x1)
        // fix x = 0
        var X = 0.0
        var Y = m * (X - x1) + y1
        if (0 <= Y && Y <= H) {
            candidates.add(Y * W / 2.0)
        }

        Y = H
        X = (Y - y1) / m + x1
        if (0 <= X && X <= W) {
            candidates.add((W - X) * H / 2.0)
        }
    }

    // case (0, H), (x1, y1)
    if (0 -x1 != 0.0) {
        /*
        val yA = fun(x: Double) : Double {
            return m * (x - x1) + y1
        }
        */
        val m = (H - y1) / (-x1)
        var X = W
        var Y = m * (X - x1) + y1
        if (0 <= Y && Y <= H) {
            candidates.add((H -Y) * W / 2.0)
        }

        Y = 0.0
        X = (Y - y1) / m + x1
        if (0 <= X && X <= W) {
            candidates.add( X * H / 2.0)
        }
    }
    // case (W, H), (x1, y1)
    if (W - x1 != 0.0) {
        val m = (H - y1) / (W -x1)
        var X = 0.0
        var Y = m * (X - x1) + y1
        if (0 <= Y && Y <= H) {
            candidates.add((H -Y) * W / 2.0)
        }

        Y = 0.0
        X = (Y - y1) / m + x1
        if (0 <= X && X <= W) {
            candidates.add( (W -X) * H / 2.0)
        }
    }
    // case (0, 0), (x1, y1)
    if (x1 != 0.0) {
        val m = (y1) / (x1)
        var X = W
        var Y = m * (X - x1) + y1
        if (0 <= Y && Y <= H) {
            candidates.add((Y) * W / 2.0)
        }

        Y = H
        X = (Y - y1) / m + x1
        if (0 <= X && X <= W) {
            candidates.add( (X) * H / 2.0)
        }
    }

    val answer = candidates.max()!!

    val size = candidates.filter { it == answer }.size

    if (size > 1) {
        println(answer.toString() + " " + "1")
    } else {
        println(answer.toString() + " " + "0")
    }
}

Compiler output:
a.cc:1:1: error: 'fun' does not name a type
    1 | fun main(args : Array<String>) {
      | ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int W, H, x, y;
  cin >> W >> H >> x >> y;
  
  int area;
  
  if( y == 0 || y == H || x == 0 || x ==H ){

    cout << long long)W*H/2 << ' ' << 0 << endl;    

  }else{
  
  
    area = max ( min(x*H,(W-x)*H) , min(y*W,(H-y)*W) );
    cout << area << ' ';
  
    if( x==W/2 && y==H/2 )
      cout << 1 << endl;
    else
      cout << 0 << endl;
  }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: expected primary-expression before 'long'
   12 |     cout << long long)W*H/2 << ' ' << 0 << endl;
      |             ^~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <string>
using namespace std;
int main(void){
    int f=0;
    double ans;
    long long w,h,x,y;
    cin>>w>>h>>x>>y;
    ans=max(min((double)(w-x)*h,(double)x*h),min(double)(w*(h-y),(double)w*y));
    if(w==h)f=1;
    printf("%.9f",ans);
    cout<<" "<<f<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:50: error: expected primary-expression before 'double'
   12 |     ans=max(min((double)(w-x)*h,(double)x*h),min(double)(w*(h-y),(double)w*y));
      |                                                  ^~~~~~
Language: C++

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

int main(){
  double w,h,x,y;
  
  cin >> w >> h >> x >> y;
  
  double m1,,m2,m,a,b,c,d;
  int an=0;
	a=(w-x)*h;
  	b=(w-(w-x))*h;
  	m1=min(a,b);
  	c=w*(h-y);
  	d=w*(h-(h-y));
  	m2=min(c,d);
  	m=min(m1,m2);
  	if(m1==m2) an=1;
  	printf("%.6f",m);
  	cout << " " << an << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected unqualified-id before ',' token
   10 |   double m1,,m2,m,a,b,c,d;
      |             ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <string>
using namespace std;
int main(void){
    int f=0;
    double ans;
    ll w,h,x,y;
    cin>>w>>h>>x>>y;
    ans=max(min((double)(w-x)*h,(double)x*h),min(double)(w*(h-y),(double)w*y));
    if(w==h)f=1;
    printf("%.9f",ans);
    cout<<" "<<f<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'll' was not declared in this scope
   10 |     ll w,h,x,y;
      |     ^~
a.cc:11:10: error: 'w' was not declared in this scope
   11 |     cin>>w>>h>>x>>y;
      |          ^
a.cc:11:13: error: 'h' was not declared in this scope
   11 |     cin>>w>>h>>x>>y;
      |             ^
a.cc:11:16: error: 'x' was not declared in this scope
   11 |     cin>>w>>h>>x>>y;
      |                ^
a.cc:11:19: error: 'y' was not declared in this scope
   11 |     cin>>w>>h>>x>>y;
      |                   ^
a.cc:12:50: error: expected primary-expression before 'double'
   12 |     ans=max(min((double)(w-x)*h,(double)x*h),min(double)(w*(h-y),(double)w*y));
      |                                                  ^~~~~~
Language: C++

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

int main(){
  double w,h,x,y;
  
  cin >> w >> h >> x >> y;
  
  double m1,,m2,m,a,b,c;
  int an=0;
	a=(w-x)*h;
  	b=(w-(w-x))*h;
  	m1=min(a,b);
  	c=w*(h-y);
  	d=w*(h-(h-y));
  	m2=min(c,d);
  	m=min(m1,m2);
  	if(m1==m2) an=1;
  	printf("%.6f",m);
  	cout << " " << an << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected unqualified-id before ',' token
   10 |   double m1,,m2,m,a,b,c;
      |             ^
a.cc:16:9: error: 'd' was not declared in this scope
   16 |         d=w*(h-(h-y));
      |         ^
Language: C++

#include <iostream>
#include <cstring>
#include <map>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <set>
#include <vector>
#include <queue>
#include <list>
#include <numeric>

using namespace std;
typedef long long ll;

int gcd(int x, int y) {
  if (x < y) swap(x, y);
  while (y > 0) {
    int r = x % y;
    x = y;
    y = r;
  }
  return x;
}

int kaijo(int n){
    int fact = 1;
    if(n == 0) return 1;
    else{for(int i = 1; i <= n; i++){
        fact*=i;
    }
    }
    return fact;
}


/*迷路
const int INF = 50;

typedef pair<int,int> P;
char field[52][52];
int d[51][51];
int r,c;
int sx,sy;
int gx,gy;

int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

int bfs(){
    queue<P> que;
    for(int i=0;i<r;i++){
        for(int j=0;j<c;j++){
            d[i+1][j+1] = INF;
        }
    }
    que.push(P(sy,sx));
    d[sy][sx]=0;
while(que.size()){
    P p=que.front();
    que.pop();
    if(p.second==gx&&p.first==gy) break;
    for(int i=0;i<4;i++){
        int nx=p.second+dx[i];
        int ny=p.first+dy[i];

        if(1<=nx&&nx<=c&&1<=ny&&ny<=r&&field[ny][nx]!='#'&&d[ny][nx]==INF){
            que.push(P(ny,nx));
            d[ny][nx] = d[p.first][p.second] + 1;
        }
    }
}
return d[gy][gx];
}
*/

//for(int i = ; i < ; i++){}

int main(){
    double w,h,x,y;
    cin>>w>>h>>x>>y;
    int max = 0;
    int a = max((min(x,w-x)*h),(min(y,h-y)*w));
    int b = max((y*h+min(x,w-x))/2,(min(y,h-y)+x*h)/2)
    cout<<setprecision(10)<<max(a,b)<<" ";
    if(min(x,w-x)*h==min(y,h-y)*w) cout<<1<<endl;
    else cout<<0<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:83:16: error: 'max' cannot be used as a function
   83 |     int a = max((min(x,w-x)*h),(min(y,h-y)*w));
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:84:16: error: 'max' cannot be used as a function
   84 |     int b = max((y*h+min(x,w-x))/2,(min(y,h-y)+x*h)/2)
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

int main(){
  double w,h,x,y;
  
  cin >> w >> h >> x >> y;
  
  double m1,,m2,m,a,b,c;
  int an=0;
	a=(w-x)*h;
  	b=(w-(w-x))*h;
  	m1=min(a,b);
  	c=w*(h-y);
  	d=w*(h-(h-y));
  	m2=min(c,d);
  	m=min(m1,m2);
  	if(m1==m2) cn=1;
  	printf("%.6f",m);
  	cout << " " << cn << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected unqualified-id before ',' token
   10 |   double m1,,m2,m,a,b,c;
      |             ^
a.cc:16:9: error: 'd' was not declared in this scope
   16 |         d=w*(h-(h-y));
      |         ^
a.cc:19:20: error: 'cn' was not declared in this scope; did you mean 'an'?
   19 |         if(m1==m2) cn=1;
      |                    ^~
      |                    an
a.cc:21:24: error: 'cn' was not declared in this scope; did you mean 'an'?
   21 |         cout << " " << cn << endl;
      |                        ^~
      |                        an
Language: C++

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

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | double main() {
      | ^~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <numeric>
#include <vector>
#define rep(i,n) for(int i=0;i<n;i++)
#define ll long long int
#define MAX 1000000007

using namespace std;

int min(int a, int b){
	if(a<b)return a;
	else return b;
}

ll gcd(ll a, ll b){
	if(b == 0)return a;
	return gcd(b,a%b);
}


int main(void){
	ll w,h,x,y;
	cin>>w>>h>>x>>y;
	ll a[2];
	if(h-y>y)a[0]=w*y;
	else a[0]=w*(h-y);
	if(w-x>x)a[1]=h*x;
	else a[1]=h*(w-x);


	if((x==0 && y==0) || (x==w && y==0) (x==0 && y== h) (x==w && y==h))printf("%lf 0\n",(double)w*h/2);
	else if(a[0]>a[1])printf("%lf 0\n",(double)a[0]);
	else if(a[0]<a[1])printf("%lf 0\n",(double)a[1]);
	else printf("%lf 1\n",(double)a[0]);
	return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:45: error: expression cannot be used as a function
   33 |         if((x==0 && y==0) || (x==w && y==0) (x==0 && y== h) (x==w && y==h))printf("%lf 0\n",(double)w*h/2);
      |                              ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		double w = sc.nextInt();
		double h = sc.nextInt();
        double x = sc.nextInt();
        double y = sc.nextInt();
        int ans = 0;
		if ((x == w/2) && (y == h/2)) {
        	ans = 1;
        }
        double s = w * h / 2;
		System.out.println(s, ans);
	}
}

Compiler output:
Main.java:14: error: no suitable method found for println(double,int)
		System.out.println(s, ans);
		          ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
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();
        double x = sc.nextInt();
        double y = sc.nextInt();
        int ans = 0;
		if ((x == w/2) && (y == h/2)) {
        	ans = 1;
        }
        double s = w * h / 2;
		System.out.println(s, ans);
	}
}

Compiler output:
Main.java:14: error: no suitable method found for println(double,int)
		System.out.println(s, ans);
		          ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: Java


import java.util.Scanner;


public class Main {
    public static void main(String[] args) {
        new Main().run();
    }

    private void run() {
        Scanner scanner = new Scanner(System.in);
        int W = scanner.nextInt();
        int H = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();

        if((x == 0 && y == 0) || (x == 0 && y == H) || (x == W && y == 0 ) || (x ==W && y == H)){
            double tmp = (H * W) / 2;
            System.out.print(String.format("%.9f", tmp));
            System.out.print(" ");
            System.out.print(0);
            return;
        }


        double left = x * H;
        double right = (W - x) * H;
        double tmp;
        if (left <= 0.0) {
            tmp = right;
        } else if (right <= 0.0) {
            tmp = left;
        } else {
            if (left > right) {
                tmp = right;
            } else {
                tmp = left;
            }
        }

        double up = y * W;
        double down = (H - y) * W;
        double tmp2;
        if (up <= 0.0) {
            tmp2 = down;
        } else if (down <= 0.0) {
            tmp2 = up;
        } else {
            if (up > down) {
                tmp2 = down;
            } else {
                tmp2 = up;
            }
        }

        if (tmp == tmp2) {
            System.out.print(String.format("%.9f", tmp));
            System.out.print(" ");
            System.out.print(1);
        } else if (tmp > tmp2) {
            System.out.print(String.format("%.9f", tmp));
            System.out.print(" ");
            System.out.print(0);
        } else {
            System.out.print(String.format("%.9f", tmp2));
            System.out.print(" ");
            System.out.print(0);
        }
    }


Compiler output:
Main.java:69: error: reached end of file while parsing
    }
     ^
1 error
Language: C

#include<stdio.h>
int main(void)
{
	int w, h, x, y, i;
	float ans;
	scanf_s("%d%d%d%d", &w, &h, &x, &y);
	if (x < y) {
		ans = ((w - x) * 2.0) * h ;
	}
	else {
		ans = ((h - y) * 2.0) * w ;
	}
	printf("%f ", ans/2);
	if (w == h && x == y)
		printf("1");
	else
		printf("0");

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         scanf_s("%d%d%d%d", &w, &h, &x, &y);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
#include <vector>
#include <cmath>

using namespace std;

int main(){
  long long W,H,x,y;
  cin>>W>>H>>x>>y;
  double area = 0;
  bool multiple = false;
  int l2,b2;
  l2 = H*H;
  b2 = W*W;
  long diag = sqrt(l2+b2);
  if(diag%x==0 || diag%y==0){
    multiple = true;
  }
    area = fmax((W-x) * H, W * (H-y));
  
  if(multiple){
    cout<<area<<" 1\n";
   else
     cout<<area<<" 0\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:4: error: expected '}' before 'else'
   23 |    else
      |    ^~~~
a.cc:21:15: note: to match this '{'
   21 |   if(multiple){
      |               ^
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();
        int ans = 0;
		if ((x == w/2) && (y == h/2)) {
        	ans = 1;
        }
        double s = w * h / 2;
		System.out.println(s, ans);
	}
}

Compiler output:
Main.java:14: error: no suitable method found for println(double,int)
		System.out.println(s, ans);
		          ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
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();
        int ans = 0;
		if (x == w/2 && y == h/2) {
        	ans = 1;
        }
        double s = w * h / 2;
		System.out.println(s, ans);
	}
}

Compiler output:
Main.java:14: error: no suitable method found for println(double,int)
		System.out.println(s, ans);
		          ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: C++

#include <iostream>
#include <vector>
#include <cmath>

using namesapce std;

int main(){
  long long W,H,x,y;
  cin>>W>>H>>x>>y;
  double area = 0;
  bool multiple = false;
  int l2,b2;
  l2 = H*H;
  b2 = W*W;
  double diag = sqrt(l2+b2);
  if(diag%x==0 || diag%y==0){
    multiple = true;
  }
    area = fmax((W-x) * H, W * (H-y));
  
  if(multiple){
    cout<<area<<" 1\n";
   else
     cout<<area<<" 0\n";
  return 0;
}

Compiler output:
a.cc:5:7: error: expected nested-name-specifier before 'namesapce'
    5 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |   cin>>W>>H>>x>>y;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:10: error: invalid operands of types 'double' and 'long long int' to binary 'operator%'
   16 |   if(diag%x==0 || diag%y==0){
      |      ~~~~^~
      |      |    |
      |      |    long long int
      |      double
a.cc:16:23: error: invalid operands of types 'double' and 'long long int' to binary 'operator%'
   16 |   if(diag%x==0 || diag%y==0){
      |                   ~~~~^~
      |                   |    |
      |                   |    long long int
      |                   double
a.cc:22:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   22 |     cout<<area<<" 1\n";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:23:4: error: expected '}' before 'else'
   23 |    else
      |    ^~~~
a.cc:21:15: note: to match this '{'
   21 |   if(multiple){
      |               ^
a.cc:24:6: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |      cout<<area<<" 0\n";
      |      ^~~~
      |      std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

int main(){
  double w,h,x,y;
  cin >> w >> h >> x >>y;
  float wd,hd,answer;
  wd = w;
  hd = h;
  answer = wd * hd / 2.0;
  cout << setprecision(9) << answer;
    if(x == w/2.0 && y == h / 2.0)
      cout << " 1" << endl;
      else
        cout << " 0" << endl;
    }
    
    
}
             
            
          
      
    


Compiler output:
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define LL long long
using namespace std;
LL W,H,x,y;
int main()
{
    scanf("%lld%lld%lld%lld",&W,&H,&x,&y);
    double t=(double)W*H/2;
    ll flag=0;
    if(x*2==W&&y*2==H)
        flag=1;
    printf("%.6f %lld\n",t,flag);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'll' was not declared in this scope; did you mean 'LL'?
    9 |     ll flag=0;
      |     ^~
      |     LL
a.cc:11:9: error: 'flag' was not declared in this scope
   11 |         flag=1;
      |         ^~~~
a.cc:12:28: error: 'flag' was not declared in this scope
   12 |     printf("%.6f %lld\n",t,flag);
      |                            ^~~~
Language: C++

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

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

  int ax1 = x*h;
  int ax2 = w*h-x*h;
  int ay1 = y*w;
  int ay2 = w*h-y*w;
  int ax = min(ax1,ax2);
  int ay = min(ay1,ay2);
  int ans = max(ax,ay);
  
if(ax==0)
  cout << ay << " " << 0 <<endl;
  
else if(ay == 0)
    cout << ax << " " << 0 <<endl;
  
else if(ax == ay)  
  cout << ay << " " << 1 <<endl;
else if(x==w && y ==h)
  #include <bits/stdc++.h>
using namespace std;

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

  int ax1 = x*h;
  int ax2 = w*h-x*h;
  int ay1 = y*w;
  int ay2 = w*h-y*w;
  int ax = min(ax1,ax2);
  int ay = min(ay1,ay2);
  int ans = max(ax,ay);
  
if(x==w && y ==h)
  cout <<w*h/2 << " "<<0<<endl;
  
  
  else if(ax==0)
  cout << ay << " " << 0 <<endl;
  
else if(ay == 0)
    cout << ax << " " << 0 <<endl;
  
else if(ax == ay)  
  cout << ay << " " << 1 <<endl;



else
    cout << ans << " " << 0 <<endl;



}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   28 | int main(){
      |         ^~
a.cc:28:9: note: remove parentheses to default-initialize a variable
   28 | int main(){
      |         ^~
      |         --
a.cc:28:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:28:11: error: a function-definition is not allowed here before '{' token
   28 | int main(){
      |           ^
a.cc:60:2: error: expected '}' at end of input
   60 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
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();
        int ans = 0;
		if (x = w/2 && y = h/2) {
        	ans = 1;
        }
        float s = w * h / 2;
		System.out.println(s, ans);
	}
}

Compiler output:
Main.java:10: error: bad operand types for binary operator '&&'
		if (x = w/2 && y = h/2) {
		            ^
  first type:  int
  second type: int
Main.java:10: error: incompatible types: int cannot be converted to boolean
		if (x = w/2 && y = h/2) {
		      ^
Main.java:14: error: no suitable method found for println(float,int)
		System.out.println(s, ans);
		          ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
3 errors
Language: C

#include<stdio.h>

int main(){
  int x,y;
  double w,h;
  int m;
  double ans;
  scanf("%lf %lf %d %d",&w,&h,&x,&y);
  if(w<1 || h>1000000000)return 0;
  if(0>x || x>w)return 0;
  if(0>y || y>h)return 0;

  if(w/2==x || h/2==y)m = 1;
  else if()
  else m=0;

  ans = w*h/2;
  printf("%lf %d\n",ans ,m);

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:14:11: error: expected expression before ')' token
   14 |   else if()
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: expected '}' at end of input
   13 |     cout<<"0"<<endl;
      |                     ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
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();
        int ans = 0;
		if (x = w/2 && y = h/2) {
        	ans = 1;
        }
		System.out.println(w*h/2, ans);
	}
}

Compiler output:
Main.java:10: error: bad operand types for binary operator '&&'
		if (x = w/2 && y = h/2) {
		            ^
  first type:  int
  second type: int
Main.java:10: error: incompatible types: int cannot be converted to boolean
		if (x = w/2 && y = h/2) {
		      ^
Main.java:13: error: no suitable method found for println(int,int)
		System.out.println(w*h/2, ans);
		          ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
3 errors
Language: C++

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

#define ll long long
#define mod 1000000007
#define pll pair<long long,long long>
#define pdd pair<long double,long double>
#define mp make_pair
#define pb push_back
#define pf push_front
priority_queue<pll,vector<pll>,greater<pll> >pq;
priority_queue<ll,vector<ll>,greater<ll> >p;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll w,h,x,y;
    cin>>w>>h>>x>>y;
    double a1,a2,ans;
    if(x!=w){
        a1=x*h;
        a2=(w-x)*h;
        if(a1<a2)
            ans=a2;
        else
            ans=a1;
        if(ans%h==0){
            double p=ans/h;
            cout<<ans<<" 1";
        }
        else
            cout<<ans<<" 0";
    }
    if(x==w){
        a1=w*y;
        a2=w*(h-y);
        if(a1<a2)
            ans=a2;
        else
            ans=a1;
        if(ans%w==0){
            double p=ans/w;
            cout<<ans<<" 1";
        }
        else
            cout<<ans<<" 0";
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:15: error: invalid operands of types 'double' and 'long long int' to binary 'operator%'
   28 |         if(ans%h==0){
      |            ~~~^~
      |            |   |
      |            |   long long int
      |            double
a.cc:42:15: error: invalid operands of types 'double' and 'long long int' to binary 'operator%'
   42 |         if(ans%w==0){
      |            ~~~^~
      |            |   |
      |            |   long long int
      |            double