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

using namespace std;
int main (){
    long long H,W;
    cin>>H>>W;
    long long h=H/2;
    long long w=W/2;
    long long ans=0;
    if(H==1&&W==1){
      ans=0;
    }
   else if(H%2==0){
       ans=h*W;
    }
    else if(W%2!=0){
        ans=(h+1)*(w+1)+h*w;
    }
    else{
        ans=(h+1)*w+h*w;
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin>>H>>W;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:20:5: error: 'cout' was not declared in this scope
   20 |     cout<<ans<<endl;
      |     ^~~~
a.cc:20:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:16: error: 'endl' was not declared in this scope
   20 |     cout<<ans<<endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

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

int main() {
  long long H, W;
  cin >> H >> W;
  if(H*W%2 == 1) {
    cout << H*W/2 + 1 << endl;
  }
  else {
    cout << H*W/2 << endl;
  }
}


Compiler output:
a.cc:1:3: error: stray '#' in program
    1 | ｖ#include <bits/stdc++.h>
      |   ^
a.cc:1:1: error: '\U0000ff56' does not name a type
    1 | ｖ#include <bits/stdc++.h>
      | ^~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> H >> W;
      |   ^~~
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << H*W/2 + 1 << endl;
      |     ^~~~
a.cc:8:26: error: 'endl' was not declared in this scope
    8 |     cout << H*W/2 + 1 << endl;
      |                          ^~~~
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << H*W/2 << endl;
      |     ^~~~
a.cc:11:22: error: 'endl' was not declared in this scope
   11 |     cout << H*W/2 << endl;
      |                      ^~~~
Language: C++

# coding: utf-8
# Your code here!
x,y = map(int,input().split())
print('{:.0f}'.format((x*y+1)/2))


Compiler output:
a.cc:1:3: error: invalid preprocessing directive #coding
    1 | # coding: utf-8
      |   ^~~~~~
a.cc:2:3: error: invalid preprocessing directive #Your
    2 | # Your code here!
      |   ^~~~
a.cc:4:7: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    4 | print('{:.0f}'.format((x*y+1)/2))
      |       ^~~~~~~~
a.cc:3:1: error: 'x' does not name a type
    3 | x,y = map(int,input().split())
      | ^
Language: C

#include<stdio.h>
//#define int long long;
int main(){
	long long int  h,w;
    long long int count=1;
	scanf("%d %d",&h,&w);
if(h>=2&&m>=2){
	if((h&1)==0){
			count=(h/2)*w;
				printf("%lld",count);
		}
		else if((h&1)!=0&&(w&1)==0){
			count=h*(w/2);
			printf("%lld",count);
		}
		else if((h&1)!=0&&(w&1)!=0){
			int m=w/2;
			count=(h/2)*(w/2)+((h/2)+1)*(w-m);
			printf("%lld ",count);
		}
	}
	else{
		printf("1");
	}
	
}

Compiler output:
main.c: In function 'main':
main.c:7:10: error: 'm' undeclared (first use in this function)
    7 | if(h>=2&&m>=2){
      |          ^
main.c:7:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(){
long double H,W,result;
  scanf("%Lf %Lf",&H,&W);
  result=H*W;
if(result%2==0)
  result=result/2;
  else result=result/2+1;
  
  printf("%Lf",result);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:10: error: invalid operands to binary % (have 'long double' and 'int')
    6 | if(result%2==0)
      |          ^
Language: C

#include<stdio.h>
int main(){
long double H,W,result;
  scanf("%Lf %Lf",&H,&W);
if(H*W%2==0)
  result=H*W/2;
  else result=H*W/2+1;
  
  printf("%Lf",result);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:7: error: invalid operands to binary % (have 'long double' and 'int')
    5 | if(H*W%2==0)
      |    ~~~^
      |     |
      |     long double
Language: C

#include<stdio.h>
int main(){
long double H,W,result;
  scanf("%Ld %Ld",&H,&W);
if(H*W%2==0)
  result=H*W/2;
  else result=H*W/2+1;
  
  printf("%Ld",result);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:7: error: invalid operands to binary % (have 'long double' and 'int')
    5 | if(H*W%2==0)
      |    ~~~^
      |     |
      |     long double
Language: C

#include<stdio.h>
int main(){
long double H,W,result;
  scanf("%Ld %Ld",&H,&W);
if((H*W)%2==0)
  result=H*W/2;
  else result=H*W/2+1;
  
  printf("%Ld",result);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: invalid operands to binary % (have 'long double' and 'int')
    5 | if((H*W)%2==0)
      |    ~~~~~^
      |      |
      |      long double
Language: Java

public class Main {
  public static void main(String[] args) {
    long h, w;
    long ans = 0;
    Scanner scan = new Scanner(System.in);

    do {
      h = scan.nextInt();
      w = scan.nextInt();
    } while(1 < h && Math.pow(10, 9) < w);

    if(w%2==0 || h%2==0) {
      ans = (w*h)/2;
    } else {
      ans = (int)((w*h)/2) + 1;
    }

    System.out.println(ans);
  }
}

Compiler output:
Main.java:5: error: cannot find symbol
    Scanner scan = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
    Scanner scan = new Scanner(System.in);
                       ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C

#include<stdio.h>
int main(){
long double H,W,result;
  scanf("%Lf %Lf",&H,&W);
if((H*W)%2==0)
  result=H*W/2;
  else result=H*W/2+1;
  
  printf("%Lf",result);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: invalid operands to binary % (have 'long double' and 'int')
    5 | if((H*W)%2==0)
      |    ~~~~~^
      |      |
      |      long double
Language: C++

#include <iostream>

int main(void)
{
	int h = 0;
  	int w = 0;
  int r = 0;
  
  cin >> h >> w ;
  
  if( h % 2 != 0 && w % 2 != 0)
  {
  	r += ( w - 1 ) / 2;
    
    r += h * ( w - 1 );
    
  }
  else
  {
  	r = h * w / 2;
  }

  cout << r << endl;
}

Compiler output:
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 >> h >> w ;
      |   ^~~
      |   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:23:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   23 |   cout << r << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:23:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   23 |   cout << r << endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
  long long h,w;
  cin >> h >> w;
  int ans = 0,mode = 0;
  /*
  if(h == 1 || w == 1)
  {
    cout << 0 << endl;
  }
  */
  /*
  else if(w % 2 == 0)
  {
    for(int i = 0; i < h ; i++)
    {
      switch(mode)
      {
        case 0:
          ans += w-2;
          mode = 1;
          break;
        case 1:
          ans += w-3;
          mode = 0;
      }
    }
    cout << ans << endl;
  }
  else
  {
    for(int i = 0; i < h ; i++)
    {
      ans += w-2;
    }
    cout << ans << endl;
  }
  */
  
  
  else if(h % 2 == 0)
  {
    if(w % 2 == 0)
    {
      cout << (h*w)/2 << endl;
    }
    else
    {
      cout << (h*w)/2 << endl;
    }
  }
  else
  {
    if(w % 2 ==0)
    {
      cout << (h*w)/2 << endl;
    }
    else
    {
      cout << ((h*w)-1)/2 + 1  << endl;
    }
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:3: error: 'else' without a previous 'if'
   45 |   else if(h % 2 == 0)
      |   ^~~~
Language: C++

include <bits/stdc++.h>
using namespace std;
 
 
int main(){
/*
long long int a,b,c;
 
cin>>a>>b>>c;
 
 
if(0<a*(a-2*c)+b*(b-2*c)+c*(c-2*a)){
cout <<"Yes"<<endl;
}else{
cout <<"No"<<endl;
 
}
*/
 
 
long long int h,w;
cin >> h>>w;
 
 
 
long long int z;
 
if(h%2==0 && w%2==0){
z= (h*w)/2;
}else if(h%2==0 && w%2!=0){
if(w>1)
z= (h*(w-1))/2 + ((h)/2);
else
z=h/2;
}else if(h%2!=0 && w%2==0){
if(h>1)
z= ((h-1)*(w))/2 + ((w)/2);
else
z=w/2;
}else if(h%2!=0 && w%2!=0){
if(h>1 && w>1)
z= ((h-1)*(w-1))/2 + ((h-1)/2)+((w-1)/2)+1;
else if(h>1)
z= h/2 +1;
else if (w>1)
z= w/2 +1;
else
z=0;
}
 
cout << z<< endl;
 
 
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:22:1: error: 'cin' was not declared in this scope
   22 | cin >> h>>w;
      | ^~~
a.cc:51:1: error: 'cout' was not declared in this scope
   51 | cout << z<< endl;
      | ^~~~
a.cc:51:13: error: 'endl' was not declared in this scope
   51 | cout << z<< endl;
      |             ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define int long long

int solve(int w, int h) {
    return (h + 1) / 2 * ((w + 1) / 2) + h / 2 * (w / 2);
}

int solve2(int w, int h) {
    /*int cnt = 0;
    for (int i = 0; i < w; ++i) {
        for (int j = 0; j < h; ++j) if ((i + j) % 2 == 0) ++cnt;
    }
    return cnt;*/
    return (w * h + 1) / 2;
}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    /*while (true) {
        int w = rand() % 100 + 1, h = rand() % 100 + 1;
        if (solve(w, h) != (solve2(w, h))) {
            cout << w << ' ' << h << endl;
            break;
        }
        cout << "OK!" << endl;
    }*/
    int w, h;
    cin >> w >> h;
    if (w == 1 || h == 1) {
        cout << 1;
        return;
    }
    cout << solve2(w, h);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   36 |         return;
      |         ^~~~~~
Language: C++

#include<iostream>
long long n,m;
int main(){
	cin>>n>>m;
	cout<<((n*m/2)+(n*m%2));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |         cin>>n>>m;
      |         ^~~
      |         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:5:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |         cout<<((n*m/2)+(n*m%2));
      |         ^~~~
      |         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 <iostream>
#include <queue>

using namespace std;

const int N = 1e9 + 10;

int n, m, color, cnt;
int vis[N][N];
bool mp[N][N];
int ans[100010]; // ﾓﾐｼｸｸｻﾍｬｵﾄｿ・
int xx[] = {1, 1, -1, -1};
int yy[] = {-1, 1, -1, 1};

void bfs(int x, int y) {
	queue<int> h;
	queue<int> l;
	h.push(x);
	l.push(y);
	vis[x][y] = color;
	while (!h.empty()) {
		for (int i = 0; i < 4; i++) {
			int dx = h.front() + xx[i];
			int dy = l.front() + yy[i];
			if (dx >= 1 && dx <= n && dy >=1 && dy <= m && !vis[dx][dy]
			 && (h.front() + l.front() == dx + dy || h.front() - l.front() == dx - dy)) {
				h.push(dx);
				l.push(dy);
				vis[dx][dy] = color;
			}
		}
		h.pop(), l.pop();
		cnt++;
	}
}

int main() {
	cin >> n >> m;
	
	for (int i = 1; i <= n; i++) {
		for (int j = 1; j <= m; j++) {
			if (!vis[i][j]) {
				color++;
				bfs(i, j);
				ans[color] = cnt;
			}
		}
	}	

	cout << ans[vis[1][1]] << '\n';
	
	return 0;
}

Compiler output:
/tmp/ccLm0CNE.o: in function `main':
a.cc:(.text+0x3a3): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccLm0CNE.o
a.cc:(.text+0x3e8): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccLm0CNE.o
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long a,b;
	cin>>a>>b;
	if(a%2==0||b%2==0)
		cout<<a*b/2;
	else
	{
		a--;
		long long sm=a*b/2;
		sm+=(b+1)/2
		cout<<sm;
	}	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: expected ';' before 'cout'
   13 |                 sm+=(b+1)/2
      |                            ^
      |                            ;
   14 |                 cout<<sm;
      |                 ~~~~
Language: Java

import java.util.Scanner;

public class Main3 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String num = scan.nextLine();
		String[] numbers = num.split(" ");
		long H = Long.parseLong(numbers[0]);
		long W = Long.parseLong(numbers[1]);

		if(H%2==0) {
			long s = H/2;
			System.out.println(s*W);
		}
		if(H%2==1 && W%2==0) {
			System.out.println(H*(W/2));
		}
		if(H%2==1 && W%2==1) {
			System.out.println(H*((W-1)/2)+(H+1)/2);
		}

	}
}

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

import java.util.Scanner;

public class Main3 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String num = scan.nextLine();
		String[] numbers = num.split(" ");
		long H = Long.parseLong(numbers[0]);
		long W = Long.parseLong(numbers[1]);

		if(H%2==0) {
			long s = H/2;
			System.out.println(s*W);
		}
		if(H%2==1 && W%2==0) {
			System.out.println(H*(W/2));
		}
		if(H%2==1 && W%2==1) {
			System.out.println(H*((W-1)/2)+(H+1)/2);
		}

	}
}


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

import numpy as np
import fractions

a,b=map(int, input().split())
if(a%2):
    if(b%2):
        print(b*(a//2)+(b//2+1))
    else:
        print(b//2*a)
else:
    print(a//2*b)



Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import numpy as np
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

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

main() {
    int H, W;
    cin >> H >> W;
    if (H % 2 == 0) {
      cout << H * W / 2 << endl;
    }
    else {
      if (W % 2 == 0) {
        cout << (H + 1) * W / 2 + << endl;
      }
      else {
        cout << H * W / 2 + (W / 2) + 1 << endl;
      }
    }
}

Compiler output:
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:13:35: error: expected primary-expression before '<<' token
   13 |         cout << (H + 1) * W / 2 + << endl;
      |                                   ^~
Language: C++

#include <cmath>
using namespace std;
int main(void){
    // Your code here!
    long long H, W;
    long long x = 0;
    cin >> H >> W;
    for(int i = 1;i <= W;i++){
        if(H % 2){
            if(i % 2){
                x += H / 2 + 1;
            }else{
                x += H / 2 ;
            }
        }else{
            x += H / 2 ;
        }
        
    }
    cout << x << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> H >> W;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <cmath>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:20:5: error: 'cout' was not declared in this scope
   20 |     cout << x << endl;
      |     ^~~~
a.cc:20:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:18: error: 'endl' was not declared in this scope
   20 |     cout << x << endl;
      |                  ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <cmath>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C

#include <stdio.h>

int main()
{
	long long int h,w;
	long long int s;
  
  	scanf("%lld %lld",&h,&w):
	
	s = h * w / 2;
	if(h * w / 2 == 1)s++;
	else if(h == 1 || w == 1)s = 1;
	
	printf("%lld\n",s);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:33: error: expected ';' before ':' token
    8 |         scanf("%lld %lld",&h,&w):
      |                                 ^
      |                                 ;
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
int main(){
    long long int a,b;
    cin >>a>>b;
    // if(a%2==0 && b%2==0){
    //     cout <<(a*b)/2;
    // }
    if (a=1 || b=1) {
        cout <<1;
        return 0;
    }
    if (((a*b)%2)==0){
        cout <<(a*b)/2;
    }
    else {
        cout << (ceil((a*b)/2));
    }
    
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: lvalue required as left operand of assignment
   10 |     if (a=1 || b=1) {
      |           ~~^~~~
Language: C++

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

int kaijo(int a){
  int i,ans=1;
  for(i=1;i<=a;i++){
  ans*=i;
  }
  return ans;
}

int mathC(int a,int b){

  int i,ans=1;
  if(b>a/2) b=a-b;
  for(i=1;i<=b;i++){
    ans*=(a-i+1);
    ans/=i;
  }
  
  return ans;
}

int max(int x[],int N){
  int i,max=x[0];
	for(i=1;i<N;i++){
      if(max<x[i]) max=x[i];
    }
  return max;
}

int min(int x[],int N){
  int i,min=x[0];
	for(i=1;i<N;i++){
      if(min>x[i]) min=x[i];
    }
  return min;
}

void solve(void){
  
long long int H,W,ans=0;
  cin >> H >> W;
  ans = H/2;
  
  if(H%2==1){
  ans *= W;
  ans += (W/2);
  }else{
  ans *= W;
  }
  
  if((H%2==1)&&(W%2==1)) ans+=1;
  
  if(H<1||W<1) ans=0;
  
  cout << ans <<endl;

Compiler output:
a.cc: In function 'void solve()':
a.cc:61:22: error: expected '}' at end of input
   61 |   cout << ans <<endl;
      |                      ^
a.cc:44:17: note: to match this '{'
   44 | void solve(void){
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  long double h , w , k = 2;
  cin >> h >> w;
  if ((h*w)%2 == 1)	cout << ((h*w)/k) +1;
  else
  {
    cout << ((h*k)/k);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: invalid operands of types 'long double' and 'int' to binary 'operator%'
    6 |   if ((h*w)%2 == 1)     cout << ((h*w)/k) +1;
      |       ~~~~~^~
      |         |   |
      |         |   int
      |         long double
Language: C++

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

int main() {
  long long long int H,W;
  cin >> H >> W;
  
  if((H*W % 2) == 0){
    cout << H*W/2 << endl;
  }
  else{
    cout << H*W/2 + 1 << endl;
  }   
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: 'long long long' is too long for GCC
    5 |   long long long int H,W;
      |             ^~~~
Language: C++

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

void main()
{

	long long H,W;
	
	scanf("%lld %lld",&H,&W);
	
	long long oppai = H - (H/2) * 2;
 	
 	long long answer;
 	
	if( oppai == 1 ){
		answer = ( H / 2 ) * ( W ) + ( W / 2 ) + 1 ;
	} else {
		answer = ( H / 2 ) * (W) ;
	}
	
	printf("%lld",answer);
	return 0;
}


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

int main() {
 	long long h,w ;
  cin >> h>> w;
  long long ans,x,y;
  if(h==1 || w==1){

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> h>> w;
      |   ^~~
a.cc:30:3: error: 'cout' was not declared in this scope
   30 |   cout << ans << endl;
      |   ^~~~
a.cc:30:18: error: 'endl' was not declared in this scope
   30 |   cout << ans << endl;
      |                  ^~~~
Language: C++

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

long long main()
{

	long long H,W;
	
	scanf("%lld %lld",&H,&W);
	
	long long oppai = H - (H/2) * 2;
 	
 	long long answer;
 	
	if( oppai == 1 ){
		answer = ( H / 2 ) * ( W ) + ( W / 2 ) + 1 ;
	} else {
		answer = ( H / 2 ) * (W) ;
	}
	
	printf("%lld",answer);
	return 0;
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main() {
	int h, w;

	cin >> h >> w;

	if (h*w % 2 >= 5) {
		cout << h * w /2 +1<< endl;
	}
	else(h*w % 2 ==0){
		cout << h * w / 2 << endl;
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: expected ';' before '{' token
   13 |         else(h*w % 2 ==0){
      |                          ^
      |                          ;
Language: C++

#include <iostream>
using namespace std;
void cal_1(int H, int W, int table[H][W], int h0, int w0)
{
    for (int h = 0; h < H; h++)
    {
        for (int w = 0; w < W; w++)
        {
            if (h0 + w0 == h + w ^ h0 - w0 == h - w)
            {
                table[h][w] = 1;
                cal_1(H, W, table, h, w);
            }
        }
    }
}
int main()
{
    int H, W;
    cin >> H >> W;
    int table[H][W] = {0};
    cal_1(H, W, table, h0, w0);
    int sum = 0;
    for (int h = 0; h < H; h++)
    {
        for (int w = 0; w < W; w++)
        {
            if (table[h][w] == 1)
            {
                sum++;
            }
        }
    }
    cout << sum << endl;
    return 0;
}


Compiler output:
a.cc:3:37: error: use of parameter outside function body before ']' token
    3 | void cal_1(int H, int W, int table[H][W], int h0, int w0)
      |                                     ^
a.cc:3:40: error: use of parameter outside function body before ']' token
    3 | void cal_1(int H, int W, int table[H][W], int h0, int w0)
      |                                        ^
a.cc:3:41: error: expected ')' before ',' token
    3 | void cal_1(int H, int W, int table[H][W], int h0, int w0)
      |           ~                             ^
      |                                         )
a.cc:3:43: error: expected unqualified-id before 'int'
    3 | void cal_1(int H, int W, int table[H][W], int h0, int w0)
      |                                           ^~~
a.cc: In function 'int main()':
a.cc:22:24: error: 'h0' was not declared in this scope
   22 |     cal_1(H, W, table, h0, w0);
      |                        ^~
a.cc:22:28: error: 'w0' was not declared in this scope
   22 |     cal_1(H, W, table, h0, w0);
      |                            ^~
Language: C++

#include<iostream>
using namespace std;

int main(void){
    long long h, w, rowcount, result;
    cin >> h >> w;

    rowcount = (w + 1) / 2;
    if((h % 2)) result = (2 * rowcount - (1 * (w % 2)) * (long long)(h / 2) + rowcount;
    else result = (2 * rowcount - (1 * (w % 2))) * (long long)(h / 2);
    cout << result << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:87: error: expected ')' before ';' token
    9 |     if((h % 2)) result = (2 * rowcount - (1 * (w % 2)) * (long long)(h / 2) + rowcount;
      |                          ~                                                            ^
      |                                                                                       )
Language: C++

/* package whatever; // don't place package name! */

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


/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner sc=new Scanner(System.in);
		String a=sc.next();
		String b=sc.next();
		BigInteger b1, b2, b3;
		b1 = new BigInteger(a); 
        b2 = new BigInteger(b); 
        b3= b1.multiply(b2);
        BigInteger one=new BigInteger("2");
        BigInteger zero=new BigInteger("0");
        BigInteger two=new BigInteger("1");
        BigInteger modu=b3.mod(one);
        if(modu.compareTo(zero)==0)
        {
        	System.out.println(b3.divide(one));
        }
        else
        {
        	System.out.println(b3.divide(one).add(two));
        }
        }
        
		
		
	}

Compiler output:
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.lang.*;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.io.*;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import java.math.BigInteger;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:12:15: error: expected ':' before 'static'
   12 |         public static void main (String[] args) throws java.lang.Exception
      |               ^~~~~~~
      |               :
a.cc:12:34: error: 'String' has not been declared
   12 |         public static void main (String[] args) throws java.lang.Exception
      |                                  ^~~~~~
a.cc:12:43: error: expected ',' or '...' before 'args'
   12 |         public static void main (String[] args) throws java.lang.Exception
      |                                           ^~~~
a.cc:12:47: error: expected ';' at end of member declaration
   12 |         public static void main (String[] args) throws java.lang.Exception
      |                                               ^
      |                                                ;
a.cc:12:49: error: 'throws' does not name a type
   12 |         public static void main (String[] args) throws java.lang.Exception
      |                                                 ^~~~~~
a.cc:38:10: error: expected ';' after class definition
   38 |         }
      |          ^
      |          ;
Language: Java

import java.util.*;
import java.math.BigInteger;
public class Main{
	public static void main(String[] args) {
    	Scanner itr = new Scanner(System.in);
      	int h = itr.nextInt();
      	int w = itr.nextInt();
      	
 		BigInteger row1 = new BigInteger((w + 1) / 2);
      	BigInteger row2 = new BigInteger(w / 2);
      
      	int i = 1;
      	BigInteger res = new BigInteger("0");
      
      	while (i <= h) {
        	if (i % 2 == 1) res.add(row1);
          	else res.add(row2);
        	i++;
        }
      
      	System.out.println(res);
    }
}


Compiler output:
Main.java:9: error: no suitable constructor found for BigInteger(int)
 		BigInteger row1 = new BigInteger((w + 1) / 2);
 		                  ^
    constructor BigInteger.BigInteger(byte[]) is not applicable
      (argument mismatch; int cannot be converted to byte[])
    constructor BigInteger.BigInteger(int[]) is not applicable
      (argument mismatch; int cannot be converted to int[])
    constructor BigInteger.BigInteger(String) is not applicable
      (argument mismatch; int cannot be converted to String)
    constructor BigInteger.BigInteger(long) is not applicable
      (BigInteger(long) has private access in BigInteger)
Main.java:10: error: no suitable constructor found for BigInteger(int)
      	BigInteger row2 = new BigInteger(w / 2);
      	                  ^
    constructor BigInteger.BigInteger(byte[]) is not applicable
      (argument mismatch; int cannot be converted to byte[])
    constructor BigInteger.BigInteger(int[]) is not applicable
      (argument mismatch; int cannot be converted to int[])
    constructor BigInteger.BigInteger(String) is not applicable
      (argument mismatch; int cannot be converted to String)
    constructor BigInteger.BigInteger(long) is not applicable
      (BigInteger(long) has private access in BigInteger)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: C++

#include <iostream>
using namespace std;

int H, W, a, b;
int answer;

int main() {
  cin >> H >> W;
  if(H % 2 == 0) answer = (H / 2) * W; 
  if(H % 2 == 1) {
    ++H;
    if(W % 2 == 0) {
      H = H /2;
      W = W / 2;
      b = H -1;
      answer = (H * W) + (b * W);
    }
    if(W % 2 ==1) {
      H = H/2;
      ++W;
      W = W / 2;
      b = H -1;
      a = (H (H * W) + (b * W);
      answer = a - b;
    }
  }
  cout << answer;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:14: error: 'H' cannot be used as a function
   23 |       a = (H (H * W) + (b * W);
      |            ~~^~~~~~~
a.cc:23:31: error: expected ')' before ';' token
   23 |       a = (H (H * W) + (b * W);
      |           ~                   ^
      |                               )
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n)  for(long long i=0;i<(long long)(n);i++)
#define REP(i,k,n) for(long long i=k;i<(long long)(n);i++)
#define all(a) a.begin(),a.end()
#define pb push_back
#define eb emplace_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
#define ub(v,k) (upper_bound(all(v),k)-v.begin())
#define fi first
#define se second
#define pi M_PI
typedef long long ll;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> PP;
typedef multiset<ll> S;
typedef priority_queue<ll> PQ;
typedef priority_queue<P,vector<P>,greater<P>> SPQ;
using vi=vector<ll>;
using vvi=vector<vi>;
using vvvi=vector<vvi>;
using vp=vector<P>;
using vvp=vector<vp>;
using vb=vector<bool>;
const ll inf=1001001001001001;
const int INF=1001001001;
const int mod=1000000007;
template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;}
template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void outp(T a){cout<<'('<<a.fi<<','<<a.se<<')'<<'\n';}
template<class T> void outvp(T v){rep(i,v.size())outp(v[i]);}
template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';}
template<class T> void outvv(T v){rep(i,v.size()){rep(j,v[i].size()){if(j)cout<<' ';cout<<v[i][j];}cout<<'\n';}}
ll gcd(ll a,ll b){if(b==0)return a;return gcd(b,a%b);}
ll modpow(ll a,ll b){a%=mod;if(b==0)return 1;if(b&1)return a*modpow(a,b-1)%mod;ll k=modpow(a,b/2);return k*k%mod;}

int main(){
    ll h,w;cin>>h>>w;
    ll ans;
    if(h%2==0){
        ans=h/2*w;
    }
    else if(w%2==0)ans=w/2*h;
    else ans=w*h/2+1;
    ll ans=((h+1)/2)*((w+1)/2)+((h/2)*(w/2));
    out(ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:8: error: redeclaration of 'll ans'
   46 |     ll ans=((h+1)/2)*((w+1)/2)+((h/2)*(w/2));
      |        ^~~
a.cc:40:8: note: 'll ans' previously declared here
   40 |     ll ans;
      |        ^~~
Language: Java

import java.util.*;
import java.math.BigInteger;
public class Main{
	public static void main(String[] args) {
    	Scanner itr = new Scanner(System.in);
      	int h = itr.nextInt();
      	int w = itr.nextInt();
      	
 		int row1 = (w + 1) / 2;
      	int row2 = w / 2;
      
      	int i = 1;
      	BigInteger res = new BigInteger("0");
      
      	while (i <= h) {
        	if (i % 2 == 1) res.add(row1);
          	else res.add(row2);
        	i++;
        }
      
      	System.out.println(res);
    }
}


Compiler output:
Main.java:16: error: no suitable method found for add(int)
        	if (i % 2 == 1) res.add(row1);
        	                   ^
    method BigInteger.add(BigInteger) is not applicable
      (argument mismatch; int cannot be converted to BigInteger)
    method BigInteger.add(long) is not applicable
      (add(long) is not public in BigInteger; cannot be accessed from outside package)
Main.java:17: error: no suitable method found for add(int)
          	else res.add(row2);
          	        ^
    method BigInteger.add(BigInteger) is not applicable
      (argument mismatch; int cannot be converted to BigInteger)
    method BigInteger.add(long) is not applicable
      (add(long) is not public in BigInteger; cannot be accessed from outside package)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: C

#include<stdio.h>
int main()
{
  long int W,H;
  if (scanf("%ld %ld",&H,&W) != 2)
    return (0);
  if (!(H >= 1 && H <= 1000000000) || !(W >= 1 && W <= 1000000000))
    return (0);
  if (H%2 == 0 || W%2 == 0)
  {
    printf("%ld",H*W/2);
  }
  else if
  {
    printf("%ld",(H*W/2) + 1);
  }
}

Compiler output:
main.c: In function 'main':
main.c:14:3: error: expected '(' before '{' token
   14 |   {
      |   ^
      |   (
Language: C++

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

int main(){
  int H,W;
  cin >> H >> W;
  if(H%2 == 0 && W%2 == 0){
    cout << (H*W)/2 << endl;
  }else if(H%2 == 0 && W%2 != 0){
    cout << (H*W)/2 << endl;
  }else if(H%2 != 0 && W%2 == 0){
    cout << (H*W)/2 << endl;
  }else{
    cout << (H*W)/2+1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

int main() {
	unsigned long long int h, w;
	unsigned long long int ans, a, b, c, lastAns;
	cin >> h >> w;
	a = ans * w;
	b = w / 2;

	if (h % 2 == 0) {
		ans = h / 2;
		cout << (ans * w);
	}
	else {
		ans = h / 2 + 1;
		if (ans * w > w / 2) {
			lastAns = a - b;

			cout << lastAns;
		}
		else if (ans * w < w / 2) {
			lastAns = b - a;
			cout << lastAns;
		}

	}


}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> h >> w;
      |         ^~~
a.cc:10:17: error: 'cout' was not declared in this scope
   10 |                 cout << (ans * w);
      |                 ^~~~
a.cc:17:25: error: 'cout' was not declared in this scope
   17 |                         cout << lastAns;
      |                         ^~~~
a.cc:21:25: error: 'cout' was not declared in this scope
   21 |                         cout << lastAns;
      |                         ^~~~
Language: C++

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

int main() {
    ll h, w;
    cin >> h >> w;
    ll ans = (w/2) * h;
    if(w % 2 == 1)ans += (h+1)/2;
    cout << ans << endl;
}   


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'll' was not declared in this scope
    5 |     ll h, w;
      |     ^~
a.cc:6:12: error: 'h' was not declared in this scope
    6 |     cin >> h >> w;
      |            ^
a.cc:6:17: error: 'w' was not declared in this scope
    6 |     cin >> h >> w;
      |                 ^
a.cc:7:7: error: expected ';' before 'ans'
    7 |     ll ans = (w/2) * h;
      |       ^~~~
      |       ;
a.cc:8:19: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |     if(w % 2 == 1)ans += (h+1)/2;
      |                   ^~~
      |                   abs
a.cc:9:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |     cout << ans << endl;
      |             ^~~
      |             abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	unsigned long long a,b;
	cin>>a>>b;
	unsigned long long x,y;
	if(b%2==1)
	{
		x=(b+1)/2;
	    y=x-1;
	}
	else
	{
		x=b/2;
	    y=x;
	}
	unsigned long longg ans=0,c=1;
	while(a--)
	{
		if(c%2==1)
		{
			c++;
			ans+=x;
		}
		else
		{
			c++;
			ans+=y;
		}	
		
	}
	cout<<ans;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:29: error: expected initializer before 'ans'
   18 |         unsigned long longg ans=0,c=1;
      |                             ^~~
a.cc:21:20: error: 'c' was not declared in this scope
   21 |                 if(c%2==1)
      |                    ^
a.cc:24:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |                         ans+=x;
      |                         ^~~
      |                         abs
a.cc:29:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   29 |                         ans+=y;
      |                         ^~~
      |                         abs
a.cc:33:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   33 |         cout<<ans;
      |               ^~~
      |               abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
typedef long long ll;
typedef pair<ll,ll> P;


int main(){
	ll h,w;
	cin>>h>>w;
	if(h%2&&w%2){
		cout<<h*w/2+1<<endl;
	}else(h%2||w%2){
		cout<<h*w/2<<endl;
	}
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: expected ';' before '{' token
   13 |         }else(h%2||w%2){
      |                        ^
      |                        ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
typedef long long ll;
typedef pair<ll,ll> P;


int main(){
	ll h,w;
	cin>>h>>w;
	if(h%2&&w&2){
		cout<<h*w/2+1<<endl;
	}else(h%2||w%2){
		cout<<h*w/2<<endl;
	}
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: expected ';' before '{' token
   13 |         }else(h%2||w%2){
      |                        ^
      |                        ;
Language: C++

#include <stdio.h>
#include <stdlib.h>
int main(int a,char **b){
  int H = 0, W = 0, M = sizeof(b) / sizeof(char) -1;
  for(int i = 0;i < M;i++){
    if (b[0][i] != ' ') H++;
    else { W = M -H; break;}
  }
  a = (H - H % 2) * int(W / 2) + int(H / 2) + H % 2;
  printf("%d", a)
  return 1;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:10:18: error: expected ';' before 'return'
   10 |   printf("%d", a)
      |                  ^
      |                  ;
   11 |   return 1;
      |   ~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	usigned long long int a,b;
	cin>>a>>b;
	if(a==1 or b==1)
	cout<<1;
	else{
		if(a%2!=0 and b%2!=0)
			cout<<((a*b)/2)+1;
			
		else
			cout<<(a*b)/2;
	}
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'usigned' was not declared in this scope; did you mean 'unsigned'?
    5 |         usigned long long int a,b;
      |         ^~~~~~~
      |         unsigned
a.cc:6:14: error: 'a' was not declared in this scope
    6 |         cin>>a>>b;
      |              ^
a.cc:6:17: error: 'b' was not declared in this scope
    6 |         cin>>a>>b;
      |                 ^
Language: C++

#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>

using namespace std;
/*
struct Memo {
	int fact = 0;
	int fact_inv = 0;
	int inv = 0;
};
class Combination {
private:
	int m_module = 1000000007;
	vector<struct Memo> memo;
public:
	int calculate(int, int);
	Combination(int, int);
};
int Combination::calculate(int n, int k) {
	return (memo[n].fact * memo[k].fact_inv * memo[n - k].fact_inv) % m_module;
}
Combination::Combination(int memo_max, int module = 1000000007) {
	m_module = module;
	memo.push_back({ 1,1,0 });
	memo.push_back({ 1,1,1 });
	for (int loop = 2; loop <= memo_max; loop++) {
		struct Memo temp;
		temp.fact = (memo[loop - 1].fact * loop) % m_module;
		temp.inv = m_module - memo[m_module % loop].inv * int(m_module / loop) % m_module;
		temp.fact_inv = (memo[loop - 1].fact_inv * temp.inv) % m_module;
		memo.push_back(temp);
	}
}
*/
void A_Kth_Term(void) {

	int num[32] = { 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51 };
	int K;
	cin >> K;
	cout << num[K - 1] << flush;
	return;
}

void B_Bishop(void) {

	long long H, W;
	cin >> H >> W;

	if (H % 2 == 0 || W % 2 == 0)	cout << H * W / 2 << flush;
	else							cout << long long(H * W + 1) / 2 << flush;
	return;
}

void C_Sqrt_Inequality(void) {

	long long a, b, c;
	cin >> a >> b >> c;

	cout << ((a + b < c && (c - a - b) * (c - a - b) - 4 * a * b > 0) ? "Yes" : "No") << flush;
	return;
}
/*
void D_String_Equivalence(void) {

	int N;
	cin >> N;

	vector<char> S(N);

	for (int loop = N; loop > 0; loop--) {


	}
	return;
}
*/
int main(void) {

	//A_Kth_Term();
	B_Bishop();
	//C_Sqrt_Inequality();
	return 0;
}


Compiler output:
a.cc: In function 'void B_Bishop()':
a.cc:55:73: error: expected primary-expression before 'long'
   55 |         else                                                    cout << long long(H * W + 1) / 2 << flush;
      |                                                                         ^~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
int main(int a,char **b){
  int H = 0, W = 0, M = sizeof(b) / sizeof(char) -1;
  for(int i = 0;i < M;i++){
    if (b[0][i] != ' ') H++;
    else { W = M -H; break;}
  }
  a = (H - H % 2) * int(W / 2) + int(H / 2) + H % 2;
  printf("%d", a)
  return ;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:10:18: error: expected ';' before 'return'
   10 |   printf("%d", a)
      |                  ^
      |                  ;
   11 |   return ;
      |   ~~~~~~
Language: C++

#include <iostream>
using namespace std;

int H, W, a;
int answer;

int main() {
  cin >> H >> W;
  if(H % 2 == 0) answer = (H / 2) * W; 
  if(H % 2 == 1) {
    ++H;
    if(W % 2 == 0) {
      H = H /2;
      W = W / 2;
      answer = (H * W) + ((H - 1) * W));
    }
    if(W % 2 ==1) {
      H = H/2;
      ++W;
      W = W / 2;
      a = (H (H * W) + ((H - 1) * W));
      answer = a - (H -1);
    }
  }
  cout << answer;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:39: error: expected ';' before ')' token
   15 |       answer = (H * W) + ((H - 1) * W));
      |                                       ^
      |                                       ;
a.cc:21:14: error: 'H' cannot be used as a function
   21 |       a = (H (H * W) + ((H - 1) * W));
      |            ~~^~~~~~~
Language: C++

int main(int a,char **b){
  int H = 0, W = 0, M = sizeof(b) / sizeof(char) -1;
  for(int i = 0;i < M;i++){
    if (b[0][i] != ' ') H++;
    else { W = M -H; break;}
  }
  a = (H - H % 2) * int(W / 2) + int(H / 2) + H % 2;
  printf("%d", a)
  return ;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:8:3: error: 'printf' was not declared in this scope
    8 |   printf("%d", a)
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(int a,char **b){
Language: C++

#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>

using namespace std;

struct Memo {
	int fact = 0;
	int fact_inv = 0;
	int inv = 0;
};
class Combination {
private:
	int m_module = 1000000007;
	vector<struct Memo> memo;
public:
	int calculate(int, int);
	Combination(int, int);
};
int Combination::calculate(int n, int k) {
	return (memo[n].fact * memo[k].fact_inv * memo[n - k].fact_inv) % m_module;
}
Combination::Combination(int memo_max, int module = 1000000007) {
	m_module = module;
	memo.push_back({ 1,1,0 });
	memo.push_back({ 1,1,1 });
	for (int loop = 2; loop <= memo_max; loop++) {
		struct Memo temp;
		temp.fact = (memo[loop - 1].fact * loop) % m_module;
		temp.inv = m_module - memo[m_module % loop].inv * int(m_module / loop) % m_module;
		temp.fact_inv = (memo[loop - 1].fact_inv * temp.inv) % m_module;
		memo.push_back(temp);
	}
}

void A_Kth_Term(void) {

	int num[32] = { 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51 };
	int K;
	cin >> K;
	cout << num[K - 1] << flush;
	return;
}

void B_Bishop(void) {

	long long H, W;
	cin >> H >> W;

	if (H % 2 == 0 || W % 2 == 0)	cout << H * W / 2 << flush;
	else							cout << long long(H * W + 1) / 2 << flush;
	return;
}

void C_Sqrt_Inequality(void) {

	long long a, b, c;
	cin >> a >> b >> c;

	cout << ((a + b < c && (c - a - b) * (c - a - b) - 4 * a * b > 0) ? "Yes" : "No") << flush;
	return;
}

void D_String_Equivalence(void) {

	int N;
	cin >> N;

	vector<char> S(N);

	for (int loop = N; loop > 0; loop--) {

	}
}

int main(void) {

	//A_Kth_Term();
	B_Bishop();
	//C_Sqrt_Inequality();
	return 0;
}


Compiler output:
a.cc: In function 'void B_Bishop()':
a.cc:55:73: error: expected primary-expression before 'long'
   55 |         else                                                    cout << long long(H * W + 1) / 2 << flush;
      |                                                                         ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{long long a,s;
 cin>>a>>s;
 long long p=ceil(a/2);
 long long o=ceil(s/2);
 long long j=ceil(a/2)*ceil(s/2);
 long long u=(ceil(s/2)-1)*(ceil(a/2)-1)
 return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:2: error: expected ',' or ';' before 'return'
   10 |  return 0;
      |  ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i,n) for (int i = 0; i < (n); ++i)
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
int main(){
    long h,w ;
    cin >> h >> w;
    if((h*w)%2 == 0){
        cout << (h*w)/2 << endl;
    }else{
        cout << (h*w)/2 + 1 << endl;
    }
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i,n) for (int i = 0; i < (n); ++i)
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
int main(){
    long h,w ;
    cin >> h >> w;
    if((h*w)%2 == 0){
        cout << (h*w)/2 << endl;
    }else{
        cout << (h*w)/2 + 1 << endl;
    }
    return 0;
}


Compiler output:
a.cc:24:11: error: redefinition of 'const int INF'
   24 | const int INF = 100100100;
      |           ^~~
a.cc:6:11: note: 'const int INF' previously defined here
    6 | const int INF = 100100100;
      |           ^~~
a.cc:25:11: error: redefinition of 'const int MOD'
   25 | const int MOD = (int)1e9 + 7;
      |           ^~~
a.cc:7:11: note: 'const int MOD' previously defined here
    7 | const int MOD = (int)1e9 + 7;
      |           ^~~
a.cc:26:14: error: redefinition of 'const double EPS'
   26 | const double EPS = 1e-9;
      |              ^~~
a.cc:8:14: note: 'const double EPS' previously defined here
    8 | const double EPS = 1e-9;
      |              ^~~
a.cc:27:5: error: redefinition of 'int main()'
   27 | int main(){
      |     ^~~~
a.cc:9:5: note: 'int main()' previously defined here
    9 | int main(){
      |     ^~~~
Language: C++

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

int main () {
  int 64_t H,W;
  cin >> H >> W;
  long long ans,cross;
  cross = H*W;
  if (H % 2 == 1 && W % 2 == 1) {
    ans = (cross+1)/2;
  }
  else {
    ans = cross/2;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before numeric constant
    5 |   int 64_t H,W;
      |       ^~~~
a.cc:6:10: error: 'H' was not declared in this scope
    6 |   cin >> H >> W;
      |          ^
a.cc:6:15: error: 'W' was not declared in this scope
    6 |   cin >> H >> W;
      |               ^
Language: Java

import java.math.BigInteger;
import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int h = sc.nextInt();
		int w = sc.nextInt();

		if (h * w ==1 ) {
			System.out.println(ans);
			return;
		}
		int ww1 = w / 2 + (w % 2);
		int ww2 = (w-1) / 2 + ((w-1) % 2);

		BigInteger ans = BigInteger.ZERO;

		ans = BigInteger.valueOf(ww1+ww2);
		ans = ans.multiply(BigInteger.valueOf(h/2));
		if (h % 2 == 1) {
			ans =ans.add(BigInteger.valueOf(ww1));
		}

		sc.close();
		System.out.println(ans);
	}
}


Compiler output:
Main.java:13: error: cannot find symbol
			System.out.println(ans);
			                   ^
  symbol:   variable ans
  location: class Main
1 error