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

#include <iostream>
int main(){
    double w, h;
    double x, y;
    double all;
    std::cin >> w >> h >> x >> y;
    all = w * h;
    //std::cout <<std::fixed << all/2 << std::endl; //test
    //std::cout <<std::fixed <<  w << "," << h <<","<< x << "," << y << std::endl; //test
    //if (w/2 == x) std::cout << "treu"<< std::endl; //test
    double comp1, comp2;
    int bol = 0;
    if (x == 0 || y == 0){
        std::cout << std::fixed << all/2 << " " << bol << std::endl;
    }else if(x == 0 || y == h){
        std::cout << std::fixed << all/2 << " " << bol << std::endl;
    }else if(x == w || y == 0){
        std::cout << std::fixed << all/2 << " " << bol << std::endl;
    }else if(x == w ||  y == h){
        std::cout << std::fixed << all/2 << " " << bol << std::endl;
    }
    else if{
    if((w/2) >= x) comp1 = x * h;
    else comp1 = (w-x) * h;
    //td::cout <<std::fixed << comp1 << std::endl; //test
    if((h/2) >= y) comp2 = y * w;
    else comp2 = (h-y) * w;
    //std::cout <<std::fixed << comp2 << std::endl; //test
    if (comp1 == comp2) bol = 1;
    if(comp1 > comp2) std::cout << std::fixed << comp1 << " " << bol << std::endl;
    else std::cout << std::fixed << comp2 << " " << bol << std::endl;;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: expected '(' before '{' token
   22 |     else if{
      |            ^
      |            (
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define REP(i, n) for(int i = 0; i < (n); i++)
#define SREP(i, s) for(int i = 0; i < (s.size()); i++)
#define SORT(v, n) sort(v, v+n);
#define GSORT(v, n) sort(v, v+n, greater<int>());
#define VSORT(v) sort(v.begin(),v.end());
#define VGSORT(v) sort(v.begin(),v.end(),greater<int>());
#define REV(a) reverse(begin(a),end(a));

int main(){
	ios::sync_with_stdio(false);cin.tie(0);
//////////////////////////////////////////////
	long long w,h,x,y;
	cin >> w >> h >> x >> y;
	long double a,b;
	a = (x*h<(w-x)*h ? x*h : (w-x)*h);
	b = (y*w<(h-y)*w ? y*w : (h-y)*w);

	cout << fixed << setprecision(10) << (a>b ? a : b) endl;
	cout << (a==b ? '1' : '0') << endl;
//////////////////////////////////////////////
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:59: error: expected ';' before 'endl'
   22 |         cout << fixed << setprecision(10) << (a>b ? a : b) endl;
      |                                                           ^~~~~
      |                                                           ;
Language: C++

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

#define OnlineJudge1

#define loop(x,a,n) for(int x = a;x < n;x++)
#define NumofDigits(n) ((int)log10(n)+1)
#define CountofNumber(array,n,x)  (upper_bound(array, array+n, x)-lower_bound(array, array+n, x))
#define readline(s) getline(cin,s)
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define EPS 1e-7
#define modulo ll (1e9 + 7)
const long double PI = 3.141592653589793238L;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef pair<int,ll> pill;
typedef pair<ll,ll> pll;

#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)

#define time__(d) \
    for ( \
        auto blockTime = make_pair(chrono::high_resolution_clock::now(), true); \
        blockTime.second; \
        debug("%s: %lld ms\n", d, chrono::duration_cast<chrono::milliseconds>(chrono::high_resolution_clock::now() - blockTime.first).count()), blockTime.second = false \
    )

void init(){
    cin.tie(0);
    ios::sync_with_stdio(0);
#ifdef OnlineJudge
    freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);
#endif
}

int main(){
    init();

    double w, h, x, y;   cin >> w >> h >> x >> y;

    // vertical cut
    double varea1 = h * x, varea2 = h * abs(w - x);
    // horizontal cut
    double harea1 = w * y, harea2 = w * abs(h - y);

    if(min(varea1, varea2) > min(harea1, harea2)){
        cout << fixed << setprecision(9) << W*h/2 << " " << 0;
    }
    else if(min(varea1, varea2) < min(harea1, harea2)){
        cout << fixed << setprecision(9) << w*h/2 << " " << 0;
    }
    else
        cout << fixed << setprecision(9) << w*h/2 << " " << 1;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:54:45: error: 'W' was not declared in this scope
   54 |         cout << fixed << setprecision(9) << W*h/2 << " " << 0;
      |                                             ^
Language: C++

#include <iostream>
#include <cstdlib>
#include <list>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
 
int main(void)
{
    long long int W, H, x, y;
 
    cin >> W >> H >> x >> y;

    long long int sall = W * H;

    long long int sx = 0;
    long long int sy = 0;
    if (x * H * 2 < sall)
    {
        sx = x * H;
    }
    else 
    {
        sx = (W - x) * H;
    }

    if (y * W * 2 < sall)
    {
        sy = y * W;
        if (y * 2 == H && x != 0 && x != W) d = 1;
    }
    else 
    {
        sy = (H - y) * W;
        if (x * 2 == W && y != 0 && y != H) d = 1;
    }

    long long int sans = 0;
    int d = 0;
    if (sx == sy) 
    {
        sans = sx;
        d = 1;
    }
    else if (sx < sy)
    {
        sans = sy;
    }
    else
    {
        sans = sx;
    }
    
    //cout << sx << endl;
    //cout << sy << endl;
    cout << sans << " " << d << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:45: error: 'd' was not declared in this scope
   31 |         if (y * 2 == H && x != 0 && x != W) d = 1;
      |                                             ^
a.cc:36:45: error: 'd' was not declared in this scope
   36 |         if (x * 2 == W && y != 0 && y != H) d = 1;
      |                                             ^
Language: C++

#include<iostream>

using namespace std;

int main(){
  long int a[111111];
  long int N,K;
  long int i;
  cin >> N >> K;
  for(i=0;i<=N-1;i++)
    cin >> a[i];
  long int S[111111] = {0};
  int sum = 0;
  int m = 0;

  while(sum < K){
    S[0]++;
    sum += a[m];
    m++;
    if(m==N) break;
  }
  
  for(i=1;i<=N-1;i++){
  sum -= a[i-1];
  S[i] = S[i-1]-1;
    while(sum < K){
      S[i]++;
      sum += a[m];
      m++;
      if(m>=N) goto END;
    }
}
   END:;
  
  for(j=0;j<=N-1;j++)
    S[j] = N-j-S[j]+1;
    while(i<=N-1){
      S[i] = 0;
      i++;
    }
  long  int ans = 0;
  for(i=0;i<=N-1;i++)
    ans += S[i];
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:7: error: 'j' was not declared in this scope
   35 |   for(j=0;j<=N-1;j++)
      |       ^
Language: C++

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

#define REP(i,n) for(ll i = 0;i < n;++i)
#define PB(s) push_back(s)
#define ST(n) sort(n.begin(),n.end())

using namespace std;
typedef long long ll;



int main(){
  ll W,H,x,y;
  cin >> W >> H >> x >> y;
  int multi = 0;
  if(x==0)x=W;
  if(y==0)y=H;
  double zoom = (double)W/x;
  if(W/2.0 == x && H/2.0 == y)
      cout << W*H/2.0 << " " << 1 << endl;
  else{
      ll zp =(zoom*x)*(zoom*y));
      if(zp == W*H)
        multi=1;
      ll Wmin = min((W-x)*H,x*H);
      ll Hmin = min((H-y)*W,y*W);
      ll minmin = max(Hmin,Wmin);
      if(multi==1)minmin=max(minmin,(W*H/2.0));
      cout<< minmin << " " << 0 << endl;
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:23:31: error: expected ',' or ';' before ')' token
   23 |       ll zp =(zoom*x)*(zoom*y));
      |                               ^
a.cc:29:29: error: no matching function for call to 'max(ll&, double)'
   29 |       if(multi==1)minmin=max(minmin,(W*H/2.0));
      |                          ~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:29:29: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'double')
   29 |       if(multi==1)minmin=max(minmin,(W*H/2.0));
      |                          ~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:29:29: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   29 |       if(multi==1)minmin=max(minmin,(W*H/2.0));
      |                          ~~~^~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <vector>
#include <stack>
using namespace std;
#define REP(i, n) for(int (i)=0; (i)<(n); (i)++)
#define OUT(a) cout << (a) << "\n"
#define ll long long
ll MOD = 10e9 + 7;

int main() {
    ll H,W,x,y;
    cin >> W >> H >> x >> y;
    // たて
    double tate = H * min(W-x, x);

    // 横
    double yoko = W * min(H-y, y);

    if (((y == 0 || y == H) || (x == 0 || x == W)) {
        printf("%.16lf %d\n", (max(W,H)/2.0)*min(W,H), 0);
    } else if (tate == yoko) {
        printf("%.16lf %d\n", tate, 1);
    } else {
        printf("%.16lf %d\n", max(tate, yoko), 0);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:51: error: expected ';' before '{' token
   23 |     if (((y == 0 || y == H) || (x == 0 || x == W)) {
      |                                                   ^~
      |                                                   ;
a.cc:25:7: error: expected primary-expression before 'else'
   25 |     } else if (tate == yoko) {
      |       ^~~~
a.cc:25:6: error: expected ')' before 'else'
   25 |     } else if (tate == yoko) {
      |      ^~~~~
      |      )
a.cc:23:8: note: to match this '('
   23 |     if (((y == 0 || y == H) || (x == 0 || x == W)) {
      |        ^
Language: C++

#include<bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define ll long long
using namespace std;
const int inf=1e9;
const int mod=1e9+7;
const int maxn=1e5+10;
const double eps=1e-10;
vector<double>q;
bool cmp(double a,double b){
	return a>b;
}
int main(){
	//ios::sync_with_stdio(false);
	//freopen("in","r",stdin);
	double w,h,x,y;
	cin>>w>>h>>x>>y;
	double x1=w/2,y1=h/2;
	if(x==0&&y==0){
		printf("%.9f %d\n",w*h/2,0);
		return 0;				
	}
	if(x==w&&y==h){
		printf("%.9f %d\n",w*h/2,0);
		return 0;			
	}
	if(fabs(x-x1)<eps&&(y-y1)<eps){
		printf("%.9f %d\n",w*h/2,1);
		return 0;
	}
	if(fabs(x-x1)<eps){
		printf("%.9f %d\n",w*h/2,0);
		return 0;
	}
	if(fabs(y-y1)<eps){
		printf("%.9f %d\n",w*h/2,0);
		return 0;		
	}
	double k=(y1-y)/(x1-x);
	double ri=k*(w-x1)+y1;
	double down=-y1/k+x1;
	double ub=k*(-x1)+y1;
	double le=(h-y1)/k+x1;
	double ans;
		if(y<y1){
			if(x<y1){
				ans=min((down+up)*h/2,(2*w-down-up)*h/2);
			}else{
				ans=min((down+up)*h/2,(2*w-down-up)*h/2);
			}
		}else{
			ans=min((le+ri)*w/2,(2*h-le-ri)*w/2);
		}
	printf("%.9f %d\n",ans,0);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:47: error: 'up' was not declared in this scope; did you mean 'ub'?
   49 |                                 ans=min((down+up)*h/2,(2*w-down-up)*h/2);
      |                                               ^~
      |                                               ub
a.cc:51:47: error: 'up' was not declared in this scope; did you mean 'ub'?
   51 |                                 ans=min((down+up)*h/2,(2*w-down-up)*h/2);
      |                                               ^~
      |                                               ub
Language: C++

#include<bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define ll long long
using namespace std;
const int inf=1e9;
const int mod=1e9+7;
const int maxn=1e5+10;
const double eps=1e-10;
vector<double>q;
bool cmp(double a,double b){
	return a>b;
}
int main(){
	//ios::sync_with_stdio(false);
	//freopen("in","r",stdin);
	double w,h,x,y;
	cin>>w>>h>>x>>y;
	double x1=w/2,y1=h/2;
	if(x==0&&y==0){
		printf("%.9f %d\n",w*h/2,0);
		return 0;				
	}
	if(x==w&&y==h){
		printf("%.9f %d\n",w*h/2,0);
		return 0;			
	}
	if(fabs(x-x1)<eps&&(y-y1)<eps){
		printf("%.9f %d\n",w*h/2,1);
		return 0;
	}
	if(fabs(x-x1)<eps){
		printf("%.9f %d\n",w*h/2,0);
		return 0;
	}
	if(fabs(y-y1)<eps){
		printf("%.9f %d\n",w*h/2,0);
		return 0;		
	}
	double k=(y1-y)/(x1-x);
	double ri=k*(w-x1)+y1;
	double down=-y1/k+x1;
	double tb=k*(-x1)+y1;
	double le=(h-y1)/k+x1;
	double ans;
		if(y<mx){
			if(x<mx){
				ans=min((down+up)*h/2,(2*w-down-up)*h/2);
			}else{
				ans=min((down+up)*h/2,(2*w-down-up)*h/2);
			}
		}else{
			ans=min((le+ri)*w/2,(2*h-le-ri)*w/2);
		}
	printf("%.9f %d\n",ans,0);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:22: error: 'mx' was not declared in this scope; did you mean 'x'?
   47 |                 if(y<mx){
      |                      ^~
      |                      x
a.cc:49:47: error: 'up' was not declared in this scope; did you mean 'dup'?
   49 |                                 ans=min((down+up)*h/2,(2*w-down-up)*h/2);
      |                                               ^~
      |                                               dup
a.cc:51:47: error: 'up' was not declared in this scope; did you mean 'dup'?
   51 |                                 ans=min((down+up)*h/2,(2*w-down-up)*h/2);
      |                                               ^~
      |                                               dup
Language: C++

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

int main(){
  int W, H, x, y;
  cin >>W >>H >>x >>y;
  long float ans = W*H/2;
  printf("%.9f\n", ans);

  if(W==2*x && H==2*y){
    cout << 1 << endl;
  } else {
    cout << 0 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'long' specified with 'float'
    7 |   long float ans = W*H/2;
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++) //for文マクロ
using namespace std;

typedef unsigned long ul;
typedef long long ll;
typedef pair<ul, ul> P; //ペア　タイプでふ

int main()
{

    int W, H = 0;
    int x, y = 0;
    cin >> W >> H;
    cin >> x >> y;

    if (W == H)
    {
        if (x != W && y != H && x != 0 && y != 0)
        {
            cout << W * H / 2 << " " << 1;
        }
        else
        {
            cout << W * H / 2 << " " << 0;
        }
    }
    else
    {
        if (x != W && y != H && x != 0 && y != 0)
        {

            if (max(x, y) / min(x, y) == max(H, W) / min(H, W) || max((W - x), (H - y)) / min((W - x), (H - y)) == -max(H, W) / min(H, W))
            {
                cout << W * H / 2 << " " << 1;
            }
            else
            {
                cout << W * H / 2 << " " << 0;
            }
        }
        else
        {
            cout << W * H / 2 << " " << 0;
        }
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:46:6: error: expected '}' at end of input
   46 |     }
      |      ^
a.cc:10:1: note: to match this '{'
   10 | {
      | ^
Language: C++

#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define sync ios_base::sync_with_stdio(false); cin.tie(NULL) 
#define input(arr,n) for(ll i1=0;i1<n;i1++ )cin>>arr[i1]
#define rep(n) for(ll i2=0;i2<n;i2++)
#define vmp(v,a,b) v.push_back(make_pair(a,b))
#define si(a) scanf("%lld",&a)
#define pi(a) printf("%lld",a)
#define aset(a,n,k) for(ll i3=0;i3<n;i3++)a[i3]=k; 	
#define mod 1000000007
#define mp(a,b) make_pair(a,b)
#define f first
#define s second 
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<ll, null_type,greater_equal<ll>, rb_tree_tag,tree_order_statistics_node_update>//s.order_of_key(val) *s.find_by_orde(ind)
using namespace std;
int main()
{
	sync;
	ll w,h,x,y;
	cin>>w>>h>>x>>y;
	ld area=(w/2.0)*(ld)h;
	cout<<fixed<<setprecision(15)<<area<<" ";
	if(w==2*x&&h==2*y)
	cout<<1;
	else if((w==2*x||(h==2*y))||(x==0)||(x==w)||(y==0)||(y==h)||(w*y==x*h)||(w*y+h*x-h*w==0)))
	cout<<0;
	else
	cout<<1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:98: error: expected primary-expression before ')' token
   29 |         else if((w==2*x||(h==2*y))||(x==0)||(x==w)||(y==0)||(y==h)||(w*y==x*h)||(w*y+h*x-h*w==0)))
      |                                                                                                  ^
Language: C++

#include<iostream>
using namespace std;

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

	if (w == h)
	{
		if (x == y)
		{
			if (x == w / 2)
			{
				s = w / 2 * h;
				cout << s << endl;
				cout << 0;
			}
			else
			{
				s = w / 2 * h;
				cout << 1;
			}
		}
		else
		{
			s = w / 2 * h;
			cout << 1;
		}
	}
	else
	{
		s = w / 2 * h;
		cout << 1;
	}

	return 0;


Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | double main()
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:41:18: error: expected '}' at end of input
   41 |         return 0;
      |                  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long h,w,x,y;
	cin>>h>>w;
	cin>>x>>y;
	double s1=1.0*(h-x)*w;
	double s2=1.0*(w-y)*h;
	if(s1>s2)
	  maxn=s1;
	else
	  maxn=s2;
	if(s1==s2)
	{
		int k=maxn*2;
		if(k%2!=0)
		  cout<<s1<<"00000"<<" ";
		else
		  cout<<s1<<".000000"<<" ";
		cout<<1;
	}
	else
	{
		int k=maxn*2;
		if(k%2!=0)
		  cout<<s1<<"00000"<<" ";
		else
		  cout<<s1<<".000000"<<" ";
		cout<<0;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: 'maxn' was not declared in this scope; did you mean 'main'?
   11 |           maxn=s1;
      |           ^~~~
      |           main
a.cc:13:11: error: 'maxn' was not declared in this scope; did you mean 'main'?
   13 |           maxn=s2;
      |           ^~~~
      |           main
a.cc:16:23: error: 'maxn' was not declared in this scope; did you mean 'main'?
   16 |                 int k=maxn*2;
      |                       ^~~~
      |                       main
a.cc:25:23: error: 'maxn' was not declared in this scope; did you mean 'main'?
   25 |                 int k=maxn*2;
      |                       ^~~~
      |                       main
Language: C

#include <stdio.h>

int main(){
    int i,j,k,ans=1;
    int w,h,x,y,judge;
    float s=0.0;


    scanf("%d %d %d %d",&w,&h,&x,&y);

    s = (float)w*(float)h/2.0;

    judge=0;
  	if( !(w==0||h==0) );
        if((w%2==0)&&(h%2==0)){
            if((w/2==x)&&(h/2==y)){
                judge=1;
            }   
        }
	}	
  
    printf("%f %d",s,judge);

    return 0;
}


Compiler output:
main.c:22:12: error: expected declaration specifiers or '...' before string constant
   22 |     printf("%f %d",s,judge);
      |            ^~~~~~~
main.c:22:20: error: unknown type name 's'
   22 |     printf("%f %d",s,judge);
      |                    ^
main.c:22:22: error: unknown type name 'judge'
   22 |     printf("%f %d",s,judge);
      |                      ^~~~~
main.c:24:5: error: expected identifier or '(' before 'return'
   24 |     return 0;
      |     ^~~~~~
main.c:25:1: error: expected identifier or '(' before '}' token
   25 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end())
#define VRSORT(v) sort(v.rbegin(), v.rend())
#define ll long long
#define pb(a) push_back(a)
#define INF 1000000000
#define MOD 1000000007
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;

typedef vector<unsigned int>vec;
typedef vector<vec> mat;

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 add(T &a, T b){a = ((a+b) % MOD + MOD) % MOD;};

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

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    double W,H,x,y;
    cin>>W>>H>>x>>y;
    double ans1=min((W-x)*H,x*H);
    double ans2=min((H-y)*W,y*W);
    //cout<<ans1<<":"<<ans2<<endl;
    if((x==0 && y==0)||(x==W&&y==0)||(x==0&&y==H)||(x==W&&y==H)||){
        printf("%.12lf 0\n",H*W/2);
    }
    else if(x==0||x==W||y==0||y==0){
        printf("%.12lf 0\n",max(ans1,ans2));
    }
    else if(y==(W*x/H)) printf("%.12lf 0\n",H*W/2);
    else if(ans1==ans2) printf("%.12lf 1\n",ans1);
    else printf("%.12lf 0\n",max(ans1,ans2));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:66: error: expected primary-expression before ')' token
   34 |     if((x==0 && y==0)||(x==W&&y==0)||(x==0&&y==H)||(x==W&&y==H)||){
      |                                                                  ^
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){
    ans = check
    ans2 = 1;
  }
  if(a==c && b==d){
    ans=0;
  }
  if(a==c && b==0){
    ans=0;
  }
  if(a==0 && b==d){
    ans=0;
  }
  if(a==0 && b==0){
    ans=0;
  }
  
  
  
  printf("%d %d",ans,ans2);
  return 0;
}
    
    
    
  
  



Compiler output:
main.c: In function 'main':
main.c:29:16: error: expected ';' before 'ans2'
   29 |     ans = check
      |                ^
      |                ;
   30 |     ans2 = 1;
      |     ~~~~
Language: C++

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

//repetition
#define FOR(i,a,b) for(ll i=(a);i<(b);++i)
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)

//container util
#define all(x) (x).begin(),(x).end()

//typedef
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VLL;
typedef vector<VLL> VVLL;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<ll, ll> PLL;

//const value
//const ll MOD = 1e9 + 7;
//const int dx[] = {0,1,0,-1};//{0,0,1,1,1,-1,-1,-1};
//const int dy[] = {1,0,-1,0};//{1,-1,0,1,-1,0,1,-1};

//conversion
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
inline ll toLL(string s) {ll v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}


int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  double w,h,x,y;
  cin >> w >> h;
  cin >> x >> y;
  double a[2];
  double b[2];

  printf("%0.10lf",h*w/2);
  if(h % 2 == 0 && w % 2 == 0){
    if(h/2 == y && w/2 == x){
      cout << ' ' << 1 << endl;
      return 0;
    }
  }
  cout << ' ' << 0 << endl;
  return 0;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:8: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   42 |   if(h % 2 == 0 && w % 2 == 0){
      |      ~ ^ ~
      |      |   |
      |      |   int
      |      double
a.cc:42:22: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   42 |   if(h % 2 == 0 && w % 2 == 0){
      |                    ~ ^ ~
      |                    |   |
      |                    |   int
      |                    double
Language: C

#include<stdio.h>
int main (void){
int W,H,x,y;
scanf("%d",&W);
scanf("%d",&H);
scanf("%d",&x);
scanf("%d",&y);

printf("%f",(float)x*H*H/2/(y-H))
if(x==W/2||y==H/2){
printf("%d",1);
}else{
printf("%d",0);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:34: error: expected ';' before 'if'
    9 | printf("%f",(float)x*H*H/2/(y-H))
      |                                  ^
      |                                  ;
   10 | if(x==W/2||y==H/2){
      | ~~
Language: C

#include <stdio.h>

int main(){
    int i,j,k,ans=1;
    int w,h,x,y,judge;
    float s=0.0;


    scanf("%d %d %d %d",&w,&h,&x,&y);

    s = (float)w*(float)h/2.0;

    judge=0;
  	if( !(w==0||h==0) )
        if((w%2==0)&&(h%2==0)){
            if((w/2==x)&&(h/2==y)){
                judge=1;
            }   
        }
	}	
  
    printf("%f %d",s,judge);

    return 0;
}

Compiler output:
main.c:22:12: error: expected declaration specifiers or '...' before string constant
   22 |     printf("%f %d",s,judge);
      |            ^~~~~~~
main.c:22:20: error: unknown type name 's'
   22 |     printf("%f %d",s,judge);
      |                    ^
main.c:22:22: error: unknown type name 'judge'
   22 |     printf("%f %d",s,judge);
      |                      ^~~~~
main.c:24:5: error: expected identifier or '(' before 'return'
   24 |     return 0;
      |     ^~~~~~
main.c:25:1: error: expected identifier or '(' before '}' token
   25 | }
      | ^
Language: C++

W, H, x, y = map(int, input().split())

ans = W * H / 2
multi = 0
if x == W / 2 or y == H / 2:
  multi = 1
print("{} {}".format(ans, multi))

Compiler output:
a.cc:1:1: error: 'W' does not name a type
    1 | W, H, x, y = map(int, input().split())
      | ^
Language: C++

#include＜iostream＞
#include＜math.h＞
#include＜float.h＞
using namespace std;

int main()｛
double w,h,x,y;

cin＞＞w,h,x,y;

if (x/2＝＝w+0.000000001 && x/2＝＝w-0.000000001 && y/2＝＝h+0.000000001 && y/2＝＝h-0.000000001) ｛
cout＜＜w*h/2＜＜1＜＜endl;
｝
else｛
cout＜＜w*h/2＜＜0＜＜endl;
｝
return 0;
｝

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #include\U0000ff1ciostream\U0000ff1e
    1 | #include＜iostream＞
      |  ^~~~~~~~~~~~~~~~~~~
a.cc:2:2: error: invalid preprocessing directive #include\U0000ff1cmath
    2 | #include＜math.h＞
      |  ^~~~~~~~~~~~~
a.cc:3:2: error: invalid preprocessing directive #include\U0000ff1cfloat
    3 | #include＜float.h＞
      |  ^~~~~~~~~~~~~~
a.cc:6:11: error: expected initializer before '\U0000ff5b'
    6 | int main()｛
      |           ^~
a.cc:9:1: error: 'cin\U0000ff1e\U0000ff1ew' does not name a type
    9 | cin＞＞w,h,x,y;
      | ^~~~~~~~
a.cc:11:1: error: expected unqualified-id before 'if'
   11 | if (x/2＝＝w+0.000000001 && x/2＝＝w-0.000000001 && y/2＝＝h+0.000000001 && y/2＝＝h-0.000000001) ｛
      | ^~
a.cc:13:1: error: '\U0000ff5d' does not name a type
   13 | ｝
      | ^~
a.cc:16:1: error: '\U0000ff5d' does not name a type
   16 | ｝
      | ^~
a.cc:18:1: error: '\U0000ff5d' does not name a type
   18 | ｝
      | ^~
Language: C++

#include<iostream>
#include <algorithm>
using namespace std;

int main(){
    double ans = 0;
    double n, k;
    cin >> n >> k;
    double a[n];
    double dp[n][n];
    for(double i=0;i<n;i++){
        double mid;
        cin >> mid;a[i] = mid;dp[i][i] = mid;
        if(mid >= k){ans +=1;}
    }
    for(double l = 0; l<n; l++){
        for(double m =l+1; m<n; m++){
            dp[l][m] = dp[l][m-1] + a[m];
            if(dp[l][m]>= k){
                ans +=1;
            }
        }
    }
    cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    9 |     double a[n];
      |              ^
a.cc:9:14: error: could not convert 'n' from 'double' to 'long unsigned int'
    9 |     double a[n];
      |              ^
      |              |
      |              double
a.cc:9:14: error: size of array 'a' has non-integral type 'double'
a.cc:10:18: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
   10 |     double dp[n][n];
      |                  ^
a.cc:10:18: error: could not convert 'n' from 'double' to 'long unsigned int'
   10 |     double dp[n][n];
      |                  ^
      |                  |
      |                  double
a.cc:10:18: error: size of array 'dp' has non-integral type 'double'
a.cc:10:15: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
   10 |     double dp[n][n];
      |               ^
a.cc:10:15: error: could not convert 'n' from 'double' to 'long unsigned int'
   10 |     double dp[n][n];
      |               ^
      |               |
      |               double
a.cc:10:15: error: size of array 'dp' has non-integral type 'double'
a.cc:13:21: error: invalid types 'double [1][double]' for array subscript
   13 |         cin >> mid;a[i] = mid;dp[i][i] = mid;
      |                     ^
a.cc:13:33: error: invalid types 'double [1][1][double]' for array subscript
   13 |         cin >> mid;a[i] = mid;dp[i][i] = mid;
      |                                 ^
a.cc:18:15: error: invalid types 'double [1][1][double]' for array subscript
   18 |             dp[l][m] = dp[l][m-1] + a[m];
      |               ^
a.cc:18:26: error: invalid types 'double [1][1][double]' for array subscript
   18 |             dp[l][m] = dp[l][m-1] + a[m];
      |                          ^
a.cc:18:38: error: invalid types 'double [1][double]' for array subscript
   18 |             dp[l][m] = dp[l][m-1] + a[m];
      |                                      ^
a.cc:19:18: error: invalid types 'double [1][1][double]' for array subscript
   19 |             if(dp[l][m]>= k){
      |                  ^
Language: Java

public class Main {
	BigInteger k;
	BigInteger a[];

	Main(BigInteger k, BigInteger a[]) {
		this.k = k;
		this.a = a;
	}

	public static void main(String[] args) {
		java.util.Scanner s = new java.util.Scanner(System.in);
		int w = s.nextInt();
		int h = s.nextInt();
		int x = s.nextInt();
		int y = s.nextInt();

		System.out.println(Main.calc(w, h, x, y));
	}

	public static String calc(long w, long h, long x, long y) {
		long cal = Math.max(Math.min((w - x) * h, x * h), Math.min(w * (h - y), w * h));
		boolean flg = false;
		if (cal == (w - x) * h) {
			if (cal == w * (h - y)) {
				flg = true;
			}
			if (cal == w * h) {
				flg = true;
			}
			if (cal == x * h) {
				flg = true;
			}
		}
		if (cal == x * h) {
			if (cal == w * (h - y)) {
				flg = true;
			}
			if (cal == w * h) {
				flg = true;
			}
			if (cal == (w - x) * h) {
				flg = true;

			}
		}
		return cal + " " + ((flg) ? "1" : "0");
	}

}

Compiler output:
Main.java:2: error: cannot find symbol
	BigInteger k;
	^
  symbol:   class BigInteger
  location: class Main
Main.java:3: error: cannot find symbol
	BigInteger a[];
	^
  symbol:   class BigInteger
  location: class Main
Main.java:5: error: cannot find symbol
	Main(BigInteger k, BigInteger a[]) {
	     ^
  symbol:   class BigInteger
  location: class Main
Main.java:5: error: cannot find symbol
	Main(BigInteger k, BigInteger a[]) {
	                   ^
  symbol:   class BigInteger
  location: class Main
4 errors
Language: C++

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

static int maxElement(const double* 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;
   
    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;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc:4:44: error: 'size_t' has not been declared
    4 | static int maxElement(const double* array, size_t size)
      |                                            ^~~~~~
a.cc: In function 'int maxElement(const double*, int)':
a.cc:6:5: error: 'size_t' was not declared in this scope
    6 |     size_t i;
      |     ^~~~~~
a.cc:1:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
  +++ |+#include <cstddef>
    1 | include <bits/stdc++.h>
a.cc:9:21: error: 'NULL' was not declared in this scope
    9 |     assert(array != NULL);
      |                     ^~~~
a.cc:9:21: note: 'NULL' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
a.cc:9:5: error: 'assert' was not declared in this scope
    9 |     assert(array != NULL);
      |     ^~~~~~
a.cc:1:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
  +++ |+#include <cassert>
    1 | include <bits/stdc++.h>
a.cc:14:10: error: 'i' was not declared in this scope
   14 |     for (i = 1; i < size; ++i) {
      |          ^
a.cc: In function 'int main()':
a.cc:26:5: error: 'cin' was not declared in this scope
   26 |     cin >> w >> h >> x >> y;
      |     ^~~
a.cc:32:5: error: 'cout' was not declared in this scope
   32 |     cout << setprecision(6) << area;
      |     ^~~~
a.cc:32:13: error: 'setprecision' was not declared in this scope
   32 |     cout << setprecision(6) << area;
      |             ^~~~~~~~~~~~
a.cc:35:31: error: 'endl' was not declared in this scope
   35 |         cout << " " << num << endl;
      |                               ^~~~
a.cc:37:31: error: 'endl' was not declared in this scope
   37 |         cout << " " << num << endl;
      |                               ^~~~
Language: Java

public class Main {
	BigInteger k;
	BigInteger a[];

	Main(BigInteger k, BigInteger a[]) {
		this.k = k;
		this.a = a;
	}

	public static void main(String[] args) {
		java.util.Scanner s = new java.util.Scanner(System.in);
		int w=s.nextInt();
		int h=s.nextInt();
		int x=s.nextInt();
		int y=s.nextInt();

		System.out.println(Main.calc(w, h, x, y));
	}

	public static String calc(long w,long h,long x,long y) {
		long cal= Math.max(Math.min((w-x)*h, x*h), Math.min(w*(h-y), w*h));
		boolean flg =false;
		if(cal == (w-x)*h) {
			if(cal == w*(h-y)) {
				flg = true;
			}
			if(cal == w*h) {
				flg = true;
			}
		}
		if(cal == x*h) {
			if(cal == w*(h-y)) {
				flg = true;
			}
			if(cal == w*h) {
				flg = true;
			}
		}
		return cal+" "+((flg)?"1":"0");
	}

}

Compiler output:
Main.java:2: error: cannot find symbol
	BigInteger k;
	^
  symbol:   class BigInteger
  location: class Main
Main.java:3: error: cannot find symbol
	BigInteger a[];
	^
  symbol:   class BigInteger
  location: class Main
Main.java:5: error: cannot find symbol
	Main(BigInteger k, BigInteger a[]) {
	     ^
  symbol:   class BigInteger
  location: class Main
Main.java:5: error: cannot find symbol
	Main(BigInteger k, BigInteger a[]) {
	                   ^
  symbol:   class BigInteger
  location: class Main
4 errors
Language: C++

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

int main() {
  double W, H, x, y;
  double S;
  int p;
  cin >> W >> H >> x >>y;
  
  if(W == H){
  if(x == W/2 && y == H/2){
    p = 1;
  }
  else{
    p = 0;
  }
    else{
      p = 0;
    }
  }
  
  if(W < H){
    if(x < W/2){
      S = x * H;
    }
    else{
      S = (W * H) - (x * H);
    }
  }
  else{
    if(y < H/2){
      S = W * y;
    }
    else{
      S = (W * H) - (W * y);
    }
  }
  cout << fixed << setprecision(9) <<S << " " << p << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: expected '}' before 'else'
   17 |     else{
      |     ^~~~
a.cc:10:13: note: to match this '{'
   10 |   if(W == H){
      |             ^
a.cc: At global scope:
a.cc:22:3: error: expected unqualified-id before 'if'
   22 |   if(W < H){
      |   ^~
a.cc:30:3: error: expected unqualified-id before 'else'
   30 |   else{
      |   ^~~~
a.cc:38:3: error: 'cout' does not name a type
   38 |   cout << fixed << setprecision(9) <<S << " " << p << endl;
      |   ^~~~
a.cc:39:1: error: expected declaration before '}' token
   39 | }
      | ^
Language: C

#include<stdio.h>
#include<math.h>

int main(void)
{
int w,h,x,y,z;
double s;
scanf("%d %d %d %d",&w,&h,&x,&y);

if((double)x=((double)w/2)&&(double)y=((double)h/2))
{
z=1;
}else{
z=0;
}

s=((double)x*(double)y)/2

printf("%f %d",s,z);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:38: error: lvalue required as left operand of assignment
   10 | if((double)x=((double)w/2)&&(double)y=((double)h/2))
      |                                      ^
main.c:17:26: error: expected ';' before 'printf'
   17 | s=((double)x*(double)y)/2
      |                          ^
      |                          ;
   18 | 
   19 | printf("%f %d",s,z);
      | ~~~~~~
Language: C++

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

int main(){
  int W, H, x, y;
  cin >> W, H, x, y;
  
  double min; // min square
  int zo;　// zero or one
  
  double squ = W * H / 2;
  
  if (x == 0) {
    if (y * 2 < H) min = W * y;
    else min = W * (H - y);
    if (y * 2 == H) zo = 1;
    else zo = 0;
  }
  else if (y == 0) {
    if (x * 2 < W) min = H * x;
    else min = H * (W - x);
    if (x * 2 == W) zo = 1;
    else zo = 0;
  }
  else {
    double l = H / W;
    double m = y / x;
    double mina, minb;
    if (l > m) {
      mina = W * y * W / x / 2;
      minb = H * (W - x);
      if (mina < minb) min = minb;
      else min = mina;
      if (mina == minb) zo = 1;
      else zo = 0;
    }
    else {
      mina = H * x * H / y / 2;
      minb = x * H;
      if (mina < minb) min = minb;
      else min = mina;
      if (mina == minb) zo = 1;
      else zo = 0;
    }
  }
 cout << min << zo << endl;
}


Compiler output:
a.cc:9:10: error: extended character 　 is not valid in an identifier
    9 |   int zo;　// zero or one
      |          ^
a.cc: In function 'int main()':
a.cc:9:10: error: '\U00003000' was not declared in this scope
    9 |   int zo;　// zero or one
      |          ^~
Language: C++

#include<bits/stdc++.h>
using namespace std ;
#define ll long long double 
#define pb push_back 
#define mp make_pair 
int main(){
	ios_base::sync_with_stdio(false) ;
	cin.tie(NULL) ;
	ll w , h , x , y ;
  	cin >> w >> h >> x >> y ;
  	cout << (w*h)/(ll)2 << " " ;
      if(x == w/2 && y == h/2){
        cout << 1 ;
        return 0 ;
      }
      else{
        cout << 0 ;
        return 0 ;
      }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:17: error: 'long long' specified with 'double'
    3 | #define ll long long double
      |                 ^~~~
a.cc:9:9: note: in expansion of macro 'll'
    9 |         ll w , h , x , y ;
      |         ^~
a.cc:3:17: error: 'long long' specified with 'double'
    3 | #define ll long long double
      |                 ^~~~
a.cc:9:9: note: in expansion of macro 'll'
    9 |         ll w , h , x , y ;
      |         ^~
a.cc:3:17: error: 'long long' specified with 'double'
    3 | #define ll long long double
      |                 ^~~~
a.cc:9:9: note: in expansion of macro 'll'
    9 |         ll w , h , x , y ;
      |         ^~
a.cc:3:17: error: 'long long' specified with 'double'
    3 | #define ll long long double
      |                 ^~~~
a.cc:9:9: note: in expansion of macro 'll'
    9 |         ll w , h , x , y ;
      |         ^~
a.cc:3:17: error: 'long long' specified with 'double'
    3 | #define ll long long double
      |                 ^~~~
a.cc:11:24: note: in expansion of macro 'll'
   11 |         cout << (w*h)/(ll)2 << " " ;
      |                        ^~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <iomanip>
using namespace std;
typedef long long ll;

int main()
{
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <iomanip>
    using namespace std;
    typedef long long ll;

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

        string s = to_string(w * h / 2);
        if (w * h % 2 != 0)
        {
            s += ".5";
        }

        int way = 0;
        if (x * 2 == w && y * 2 == h)
        {
            way = 1;
        }

        cout << s << " " << way << endl;

        return 0;
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:13: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   23 |     int main()
      |             ^~
a.cc:23:13: note: remove parentheses to default-initialize a variable
   23 |     int main()
      |             ^~
      |             --
a.cc:23:13: note: or replace parentheses with braces to value-initialize a variable
a.cc:24:5: error: a function-definition is not allowed here before '{' token
   24 |     {
      |     ^
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=max(m1,m2);
  	if(m<(w*h)/2){ m=(w*h)/2;
                  	an=1;
                 }else{(m1==m2) an=1;}
  	printf("%.7f",m);
  	cout << " " << an << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:32: error: expected ';' before 'an'
   21 |                  }else{(m1==m2) an=1;}
      |                                ^~~
      |                                ;
Language: Java

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

class Main{
  public static void main(String[] args){
    float w,h,x,y,max,minx,miny,ans;
    Scanner sc=new Scanner(System.in);
    w=sc.nextInt();
    h=sc.nextInt();
    x=sc.nextInt();
    y=sc.nextInt();
    max=w*h;
    minx=(max-x*h > x*h)?x*h:max-x*h;
    miny=(max-w*y > w*y)?w*y:max-w*y;
    if(minx==miny){
      ans=minx;
      System.out.format("%f %d",ans, 1);
    else{
      ans=Math.max(minx,miny);
      System.out.format("%f %d",ans, 0);
    }
  }
}


Compiler output:
Main.java:19: error: 'else' without 'if'
    else{
    ^
Main.java:24: error: reached end of file while parsing
}
 ^
2 errors
Language: C

#include <stdio.h>

int main(){
    int i,j,k,ans=1;
    int w,h,x,y,judge;
    float s=0.0;


    scanf("%d %d %d %d",&w,&h,&x,&y);

    s = (float)w*(float)h/2.0;

    judge=0;
    if((w%2==0)&&(h%2==0)){
        if((w/2==x)&&(h/2==y){
            judge=1;
        }
    }


    printf("%f %d",s,judge);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:30: error: expected ')' before '{' token
   15 |         if((w/2==x)&&(h/2==y){
      |           ~                  ^
      |                              )
main.c:18:5: error: expected expression before '}' token
   18 |     }
      |     ^
Language: C

#include <stdio.h>
int main(void)
{
    int w, h, x, y, n;
    double m1, m2, m;
    scanf("%d%d%d%d", &w, &h, &x, &y);

if(w==0 || h==0){
    m1 = 0;
    printf("%f 0", m1);
}

if((x==w&&y==h) || (x==0||y==0)){
    m1 = 0;
    printf("%f 0", m1);
}

if(w*y <= w*(h-y)){
     m1 = w*y;
}else{
    m1 = w*(h-y);
}

if(h*x <= h*(w-x)){
    m2 = h*x;
}else{
    m2 = h*(w-x);
}

if(m1 >= m2){
    m = m1;
}else{
    m = m2;
}

if(m1 == m2){
    n = 1;
}else{
    n = 0;
}

Compiler output:
main.c: In function 'main':
main.c:40:1: error: expected declaration or statement at end of input
   40 | }
      | ^
Language: Java

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
 
public class Main {
 
	public Main() {
		// TODO 自動生成されたコンストラクター・スタブ
	}
 
	public static void main(String[] args){
		Map <Integer,Integer> mapL = new HashMap<Integer,Integer> ();
 
		Scanner sc = new Scanner(System.in);
			// 整数の入力
			long w,h,x,y,lenx,leny,index;
			long len,sumLen,result;
			double sx,sy,sxy;
			w = sc.nextInt();
			h = sc.nextInt();
			x = sc.nextInt();
			y = sc.nextInt();
			sumLen=0;
			result=0;
			sc.close();
 
			lenx=x;
			if(lenx>w-x) lenx=w-x;
			sx=lenx*h;
			leny=y;
			if(leny>h-y) leny=h-y;
			sy=leny*w;
			if(sx>sy) {
				sxy=sx;
			}
			else {
				sxy=sy;
			}
			if(x==w-x && y==h-y)result=1;
			else result=0;
			if(w==h && x==Y) {
				  sxy=w*h/2;
				  result=0;
			}
			if(x==0 || x==w || y==0 || y==h) {
			  sxy=w*h/2;
			  result=0;
			}
			System.out.print(String.valueOf(sxy));
			System.out.print(" ");
			System.out.println(result);
			
 
			// 出力
 
	}
}

Compiler output:
Main.java:41: error: cannot find symbol
			if(w==h && x==Y) {
			              ^
  symbol:   variable Y
  location: class Main
1 error
Language: C

#include <stdio.h>

int main(){
    int i,j,k,ans=1;
    int w,h,x,y,judge;
    float s=0.0;


    scanf("%d %d %d %d",&w,&h,&x,&y);

    s = (float)w*(float)h/2.0;

    judge=0;
    if((w%2==0)&&(h%2==0){
        if((w/2==x)&&(h/2==y){
            judge=1;
        }
    }


    printf("%f %d",s,judge);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:26: error: expected ')' before '{' token
   14 |     if((w%2==0)&&(h%2==0){
      |       ~                  ^
      |                          )
main.c:24:1: error: expected declaration or statement at end of input
   24 | }
      | ^
Language: C

#include <stdio.h>
int main(void)
{
    int w, h, x, y, n;
    double m1, m2, m;
    scanf("%d%d%d%d", &w, &h, &x, &y);

if(w==0 || h==0){
    m1 = 0;
    printf("%f 0", m1);
}

if((x==w&&y==h) || (x==0||y==0)){
    m1 = 0;
    printf("%f 0", m1);
}

if(w*y <= w*(h-y)){
     m1 = w*y;
}else{
    m1 = w*(h-y);
}

if(h*x <= h*(w-x)){
    m2 = h*x;
}else{
    m2 = h*(w-x);
}

if(m1 >= m2){
    m = m1;
}else{
    m = m2;
}

if(m1 == m2){
    n = 1;
}else{
    n = 0;
}


Compiler output:
main.c: In function 'main':
main.c:40:1: error: expected declaration or statement at end of input
   40 | }
      | ^
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		double w = scan.nextInt();
		double h = scan.nextInt();
		double x = scan.nextInt();
		double y = scan.nextInt();


		//縦長
		double tate1 = x * h;
		double tate2 = (w - x) * h;
		double tate = Math.min(tate1, tate2);

		//横長
		double yoko1 = y * w;
		double yoko2 = (h - y) * w;
		double yoko = Math.min(yoko1, yoko2);

		if (x == w && y == h) {
			System.out.println(w * h / 2 + " " + 0);

		} else if (x == 0 && y == h) {
			System.out.println(w * h / 2 + " " + 0);

		}else if (x == w && y == 0) {
			System.out.println(w * h / 2 + " " + 0);

		} else if (x == 0 && y == 0) {
			System.out.println(w * h + " " + 0);

		} else if (x == 0) {
			System.out.println(yoko + " " + 0);

		} else if (y == 0) {
			System.out.println(tate + " " + 0);

		} else if (tate > yoko) {
			System.out.println(tate + " " + 0);

		} else if (yoko > tate) {
			System.out.println(yoko + " " + 0);

		} else {
			System.out.println(tate + " " + 1);

		}

	}

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

#include <cstdio>
#include <iostream>
#include <algorithm>
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 = max(result, (double)y * W);
    if((W - x) * H == x * H)
        result = max(result, (double)x * H);
    if(W == H && x == y)
        result = max(result, (double)H * W / 2);
    if(x == 0 && y == 0 && W != H)
        result = max(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 == 0)
        flag = 0;
    printf("%0.9lf %d", result, flag);
}

Compiler output:
a.cc:8:1: error: expected initializer before 'int'
    8 | int main()
      | ^~~