criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.*;

class Main{

    public static void main(String args[]){
    	Scanner sc = new Scanner(System.in);
      	long H = sc.nextInt();
        long W = sc.nextInt();

        long sum = 0;
      	
        if(H == 1 || W == 1){
        	sum = 1;	
        }
      	else{
	      	long base1 = W / 2 + W % 2;
    	  	long base2 = (W -1)/2 + (W - 1) % 2;
      	
      		long sum = (H / 2) *(base1 + base2) + (H % 2)*base1;	
        }
      
        System.out.println(sum);
    }
}

Compiler output:
Main.java:19: error: variable sum is already defined in method main(String[])
      		long sum = (H / 2) *(base1 + base2) + (H % 2)*base1;	
      		     ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define l long
#define pb push_back
#define mp make_pair
#define mt make_tuple
ll M = 998244353;

int main() {
	// your code goes here
	//ifstream cin("input.txt");
	//ofstream cout("output.txt");
	ios_base::sync_with_stdio(false); 
    cin.tie(NULL); 
	
	ll h,w; cin>>h>>w;
	if(h==1 || w==1){ cout<<1; return 0; }
	ll ans = ((h+1)/2)*((w+1)/2) + (h/2)*(w/2)
	cout<<ans;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: expected ',' or ';' before 'cout'
   20 |         cout<<ans;
      |         ^~~~
Language: C++

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

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


Compiler output:
a.cc:3:1: error: 'll' does not name a type
    3 | ll = long long;
      | ^~
a.cc: In function 'int main()':
a.cc:6:3: error: 'll' was not declared in this scope
    6 |   ll h,w;
      |   ^~
a.cc:7:10: error: 'h' was not declared in this scope
    7 |   cin >> h >> w;
      |          ^
a.cc:7:15: error: 'w' was not declared in this scope
    7 |   cin >> h >> w;
      |               ^
Language: C++

#include <iostream>
using namespace std;
ll = long long;

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

Compiler output:
a.cc:3:1: error: 'll' does not name a type
    3 | ll = long long;
      | ^~
a.cc: In function 'int main()':
a.cc:6:3: error: 'll' was not declared in this scope
    6 |   ll h,w;
      |   ^~
a.cc:7:10: error: 'h' was not declared in this scope
    7 |   cin >> h >> w;
      |          ^
a.cc:7:15: error: 'w' was not declared in this scope
    7 |   cin >> h >> w;
      |               ^
Language: C++

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

int main() {
  int H,W;
  cin >> H >> W;
  if (min(H,W) == 1){
    cout << 1 <<endl;
    return 0;
  }
  ll n = H*W;
  ll ans = (n+1)/2
  cout << ans << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: expected ',' or ';' before 'cout'
   14 |   cout << ans << endl;
      |   ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: break statement not within loop or switch
    9 |     break;
      |     ^~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:39: error: expected primary-expression before ')' token
    8 |   if (H*W %2 == 1 && H != 1 && W != 1)) cout << (H*W +1)/2 << endl;
      |                                       ^
a.cc:9:39: error: expected primary-expression before ')' token
    9 |   if (H*W %2 == 0 && H != 1 && W != 1)) cout << (H*W)/2 <<endl;
      |                                       ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: expected '(' before 'else'
    8 |   if else (H*W %2 == 1) cout << (H*W +1)/2 << endl;
      |      ^~~~
      |      (
a.cc:9:6: error: expected '(' before 'else'
    9 |   if else ((H*W) %2 == 0) cout << (H*W)/2 <<endl;
      |      ^~~~
      |      (
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: expected '(' before 'else'
    8 |   if else((H*W) %2 == 1)cout << (H*W +1)/2 << endl;
      |      ^~~~
      |      (
a.cc:9:3: error: 'else' without a previous 'if'
    9 |   else cout << (H*W)/2 <<endl;
      |   ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: lvalue required as left operand of assignment
    7 |   if(H*W%2 = 1)cout << H*W/2 << endl;
      |      ~~~^~
Language: C++

#include<bits/stc++.h>
using namespace std;
int main()
{







long long h,w;
 					cin>>h>>w;
 					long long x= (h/2*w);
 					if(h%2!=0 && w%2!=0)
 						x++;
 					cout<<x;
  return 0;
  
}


Compiler output:
a.cc:1:9: fatal error: bits/stc++.h: No such file or directory
    1 | #include<bits/stc++.h>
      |         ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stc++.h>
using namespace std;
int main()
{







long long h,w;
 					cin>>h>>w;
 					long long x= (h/2*w);
 					if(h%2!=0 || w%2!=0)
 						x++;
 					cout<<x;
  return 0;
  
}

Compiler output:
a.cc:1:9: fatal error: bits/stc++.h: No such file or directory
    1 | #include<bits/stc++.h>
      |         ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main()
{
  int h,w;
  cin>>h>>w;
  x=math.ceil(h*w/2);
  
  
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'x' was not declared in this scope
    8 |   x=math.ceil(h*w/2);
      |   ^
a.cc:8:5: error: 'math' was not declared in this scope
    8 |   x=math.ceil(h*w/2);
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int n,m;
int main()
{
    cin>>n>>m;
    if (1ll*m*n<=n+m) return cout<<n*m<<endl;
    cout<<1ll*n*m/2+abs(n*m%2)<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:39: error: cannot convert 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} to 'int' in return
    7 |     if (1ll*m*n<=n+m) return cout<<n*m<<endl;
      |                              ~~~~~~~~~^~~~~~
      |                                       |
      |                                       std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
Language: Java

/*package whatever //do not write package name here */

import java.io.*;

class Main {
    static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
    
	public static void main (String[] args) {
	    FastReader ob = new FastReader();
	    long h = ob.nextLong(),w=ob.nextLong();
	    long ans=h*w;
	    if(ans%2==0){
	        System.out.println(ans+1);
	    }
	    else{
	        System.out.println(ans);
	    }
	}
}

Compiler output:
Main.java:9: error: cannot find symbol
        StringTokenizer st; 
        ^
  symbol:   class StringTokenizer
  location: class FastReader
Main.java:23: error: cannot find symbol
                    st = new StringTokenizer(br.readLine()); 
                             ^
  symbol:   class StringTokenizer
  location: class FastReader
2 errors
Language: Java

/*package whatever //do not write package name here */

import java.io.*;

class GFG {
    static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
    
	public static void main (String[] args) {
	    FastReader ob = new FastReader();
	    long h = ob.nextLong(),w=ob.nextLong();
	    long ans=h*w;
	    if(ans%2==0){
	        System.out.println(ans+1);
	    }
	    else{
	        System.out.println(ans);
	    }
	}
}

Compiler output:
Main.java:9: error: cannot find symbol
        StringTokenizer st; 
        ^
  symbol:   class StringTokenizer
  location: class FastReader
Main.java:23: error: cannot find symbol
                    st = new StringTokenizer(br.readLine()); 
                             ^
  symbol:   class StringTokenizer
  location: class FastReader
2 errors
Language: C++

#include<cstdio>
int main(){int a,b;scanf("%d%d",&a,&b);if(a>1&&b>1)printf("%lld\n",(1ll*n*m+1)/2);else puts("1");}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:73: error: 'n' was not declared in this scope
    2 | int main(){int a,b;scanf("%d%d",&a,&b);if(a>1&&b>1)printf("%lld\n",(1ll*n*m+1)/2);else puts("1");}
      |                                                                         ^
a.cc:2:75: error: 'm' was not declared in this scope
    2 | int main(){int a,b;scanf("%d%d",&a,&b);if(a>1&&b>1)printf("%lld\n",(1ll*n*m+1)/2);else puts("1");}
      |                                                                           ^
Language: C++

#include <iostream>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected primary-expression before '<<' token
   11 |     std::cout << << (prod+1)/2;
      |                  ^~
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using ll = long long;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> h >> w;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout << 1 << 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:8:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout << 1 << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout << (h*w+1)/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 <stdio.h>
#include <cstdio>
#include <iostream>
#include <iomanip>
#include <queue>
#include <set>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <complex>

int main(){

  long long int H, W;
  std::cin >> H >> W;



  std::cerr << "Answer:" << std::endl;
  if(H == 1 || W == 1){
    std::cout << 1
  }
  else{
    std::cout << (H*W+1)/2 << std::endl;
  }

  return 0;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:19: error: expected ';' before '}' token
   23 |     std::cout << 1
      |                   ^
      |                   ;
   24 |   }
      |   ~
Language: C++

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

const int INF = 1e9+5;

int main(){
    ll n,m;
    cin>>n>>m;
    if(n==1 && m===1) cout<<1<<'\n';
    else cout<<(n*m+1)/2<<'\n';
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: expected primary-expression before '=' token
   10 |     if(n==1 && m===1) cout<<1<<'\n';
      |                   ^
Language: C++

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

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

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

#include <bits/stdc++.h>
using namespace std;
int main(void){
    long long h, w;
    cin >> h >> w;
    if(min(h,w) == 1){
        cout << 1;
        return;
    }
    long long n = h*w;
    long long ans = (n+1)/2;
    cout << ans;
}


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

#include <iostream>
using namespace std;
int main(void){
    long long h, w;
    cin >> h >> w;
    if(min(h,w) == 1){
        cout << 1;
        return;
    }
    long long n = h*w;
    long long ans = (n+1)/2;
    cout << ans;
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  unsigned long long int a,b;
  cin>>a>>b;
  if(a==1 || b==1)cout<<"1"<<endl;
cout<<"The bishop can reach the cyan squares in the following figure:"
  else cout<<(a*b+1)/2<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:71: error: expected ';' before 'else'
    7 | cout<<"The bishop can reach the cyan squares in the following figure:"
      |                                                                       ^
      |                                                                       ;
    8 |   else cout<<(a*b+1)/2<<endl;
      |   ~~~~
Language: C

#include <stdio.h>

int main()
{
   int h,w,a[10^9][10^9],i,j,l=0,*ptr;
   scanf("%d%d",&h,&w);
   *ptr=&a;
   for(i=0;i<h;i++)
   {
       for(j=0;j<w;j++)
       {
           if(a[i][j]=a[i+1][j+1])
       }
       l++;
       *ptr++;
   }
printf("%d",l);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:16: warning: result of '10^9' is 3; did you mean '1e9'? [-Wxor-used-as-pow]
    5 |    int h,w,a[10^9][10^9],i,j,l=0,*ptr;
      |                ^
      |              ---
      |              1e
main.c:5:14: note: you can silence this warning by using a hexadecimal constant (0xa rather than 10)
    5 |    int h,w,a[10^9][10^9],i,j,l=0,*ptr;
      |              ^~
      |              0xa
main.c:5:22: warning: result of '10^9' is 3; did you mean '1e9'? [-Wxor-used-as-pow]
    5 |    int h,w,a[10^9][10^9],i,j,l=0,*ptr;
      |                      ^
      |                    ---
      |                    1e
main.c:5:20: note: you can silence this warning by using a hexadecimal constant (0xa rather than 10)
    5 |    int h,w,a[10^9][10^9],i,j,l=0,*ptr;
      |                    ^~
      |                    0xa
main.c:7:8: error: assignment to 'int' from 'int (*)[3][3]' makes integer from pointer without a cast [-Wint-conversion]
    7 |    *ptr=&a;
      |        ^
main.c:13:8: error: expected expression before '}' token
   13 |        }
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
int a, b,i,j,k,t,c=0;
cin>>a>>b;
for(i=0;i<a;i++)
{
for(j=0;j<b;j++)
{k=0;
while(((k+j)<a)&&((j+k)<b))
{
if(((j+i)==(j+i+k+k))||((j+i)==(j+i-k-k))||((i-j)==(j+i+k+k))||((i-j)==(j+i-k-k)))
{c++;
}
k++;
}}}
cout<<c;
return 0;

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
int a, b,i,j,k,t,c=0;
cin>>a>>b;
for(i=0;i<a;i++
{
for(j=0;j<b;j++)
{k=0;
while(((k+j)<a)&&((j+k)<b))
{
if(((j+i)==(j+i+k+k))||((j+i)==(j+i-k-k))||((i-j)==(j+i+k+k))||((i-j)==(j+i-k-k)))
{c++;
}
k++;
}}}
cout<<c;
return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ')' before '{' token
    7 | for(i=0;i<a;i++
      |    ~           ^
      |                )
    8 | {
      | ~               
a.cc:19:10: error: expected '}' at end of input
   19 | return 0;
      |          ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C

#include<bits/stdc++.h>
using namespace std;
int main()
{
int a, b,i,j,k,t,c=0;
cin>>a>>b;
for(i=0;i<a;i++
{
for(j=0;j<b;j++)
{k=0;
while(((k+j)<a)&&((j+k)<b))
{
if(((j+i)==(j+i+k+k))||((j+i)==(j+i-k-k))||((i-j)==(j+i+k+k))||((i-j)==(j+i-k-k)))
{c++;
}
k++;
}}}
cout<<c;
return 0;

Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>
#define INF 1001001001
#define ll long long
#define rep(i,n)  for(i=0; i<n;  i++)
#define rep2(i,n) for(i=1; i<=n; i++)

int  get_min(int a, int b){ if(a<b) return a; else return a; }
int  get_max(int a, int b){ if(a>b) return a; else return b; }

int main(){
    ll h,w;
    scanf("%ld %ld",&h,&w);
    ll all_cell = h * w;
    if(get_min(h,w) == 1){
        printf("1\n");
        return 0;
    }
    ll answer = (all_cell+1) / 2;
    printf("%ld",anser);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:18: error: 'anser' undeclared (first use in this function); did you mean 'answer'?
   22 |     printf("%ld",anser);
      |                  ^~~~~
      |                  answer
main.c:22:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: expected ';' before '}' token
   12 |     return 0
      |             ^
      |             ;
   13 |   }
      |   ~
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String args[]){
  Scanner scan=new Scanner(System.in);
long int row=scan.nextInt();
long int col=scan.nextInt();
long int pro=row*col;
if (pro%2==0){
  System.out.println(pro/2);
}
else{
  System.out.println((pro+1)/2);
}
}
}


Compiler output:
Main.java:5: error: not a statement
long int row=scan.nextInt();
^
Main.java:5: error: ';' expected
long int row=scan.nextInt();
    ^
Main.java:6: error: not a statement
long int col=scan.nextInt();
^
Main.java:6: error: ';' expected
long int col=scan.nextInt();
    ^
Main.java:7: error: not a statement
long int pro=row*col;
^
Main.java:7: error: ';' expected
long int pro=row*col;
    ^
6 errors
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String args[]){
  Scanner scan=new Scanner(System.in);
long int row=scan.nextInt();
long int col=scan.nextInt();
long int pro=row*col;
if (pro%2==0){
  System.out.println(pro/2);
}
else{
  System.out.println((pro/2)+1);
}
}
}


Compiler output:
Main.java:5: error: not a statement
long int row=scan.nextInt();
^
Main.java:5: error: ';' expected
long int row=scan.nextInt();
    ^
Main.java:6: error: not a statement
long int col=scan.nextInt();
^
Main.java:6: error: ';' expected
long int col=scan.nextInt();
    ^
Main.java:7: error: not a statement
long int pro=row*col;
^
Main.java:7: error: ';' expected
long int pro=row*col;
    ^
6 errors
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <bitset>

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define INF 2000000000
#define rep(i,n) for(int i=0;i<(n);i++)
typedef pair<int, int> P;
const ll MOD=1000000007;
using Graph = vector<vector<int>>;
 

int cut(int a, int b) {//切り捨て
	return (a - a % b) / b;
}
ull up(ull a, ull b) {
	return (a + a % b) / b;
}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:40:18: error: expected '}' at end of input
   40 |         return 0;
      |                  ^
a.cc:32:12: note: to match this '{'
   32 | int main() {
      |            ^
Language: C++

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

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)   FOR(i,0,n)
#define ALL(a)     (a).begin(),(a).end()
#define MOD 1000000007

typedef long long int ll;

const ll INF=(ll)1e19;
//const int INF=(1<<30);


int main(){
  ll H,W;
  cin >> H >> W;
  it(H==1 || W==1){
    cout << 1 << endl;
  }else{
    cout << (H*W+1)/2 << endl;
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:18:3: error: 'it' was not declared in this scope; did you mean 'int'?
   18 |   it(H==1 || W==1){
      |   ^~
      |   int
a.cc:20:4: error: 'else' without a previous 'if'
   20 |   }else{
      |    ^~~~
Language: C++

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

int main() {
	long long H, W;
	cin >> H >> W;
  	cout << (H == 1 || W == 1 ? (H*W+1)/2) << "\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:46: error: expected ':' before ')' token
    7 |         cout << (H == 1 || W == 1 ? (H*W+1)/2) << "\n";
      |                                              ^
      |                                              :
a.cc:7:46: error: expected primary-expression before ')' token
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String args[]){
  Scanner scan=new Scanner(System.in);
int row=scan.nextInt();
int col=scan.nextInt();
int pro=row*col;
if (pro%2==0){
  System.out.println(pro/2);
}
else{
  System.out.println((pro+1)/2);
}
}


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

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main()
{
  ll h,w;
  cin>>h>>w;
  ll x=h*w;
  ll y=ceill(long double(x)/2);
  cout<<y<<"\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected primary-expression before 'long'
    9 |   ll y=ceill(long double(x)/2);
      |              ^~~~
Language: C++

a = input().split()

b = [int(s) for s in a]

if(b[0] == 1 or b[1] == 1):
  print(1)
elif(b[0]*b[1]/2 % 2 != 0):
  print(int(b[0]*b[1]/2+1))
else:
  print(int(b[0]*b[1]/2))

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a = input().split()
      | ^
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define coyes cout << "Yes" << endl;
#define cono cout << "No" << endl;
#define coYes cout << "YES" << endl;
#define coNo cout << "NO" << endl;
using namespace std;
using ll = long long int;
string large_al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
string small_al = "abcdefghijklmnopqrstuvwxyz";
using Graph = vector<vector<int>>;
using i64 = int64_t;


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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:3: error: expected '}' before 'else'
   21 |   else if (h % 2 == 0) {
      |   ^~~~
a.cc:19:25: note: to match this '{'
   19 |   if (h == 1 || w == 1) {
      |                         ^
Language: C++

#include<iostream>
using namespace std;
typedef long long ll;
int main()
{
   ll h,w;
   cin>>h>>>w;
  
  if(h==1||w==1)
    cout<<1<<endl;
  else
   cout << (H * W + 1) / 2 << endl; 
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected primary-expression before '>' token
    7 |    cin>>h>>>w;
      |            ^
a.cc:12:13: error: 'H' was not declared in this scope
   12 |    cout << (H * W + 1) / 2 << endl;
      |             ^
a.cc:12:17: error: 'W' was not declared in this scope
   12 |    cout << (H * W + 1) / 2 << endl;
      |                 ^
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc:14:3: error: 'cout' does not name a type
   14 |   cout << tmp;
      |   ^~~~
a.cc:16:3: error: expected unqualified-id before 'return'
   16 |   return 0;
      |   ^~~~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

#include <iostream>
2
3 using namespace std;
4 typedef long long ll;
5
6 int main(void){
7 ll H,W;
8 cin >> H >> W;
9
10 if(H == 1 || W == 1){
11 cout << 1 << endl;
12 } else {
13 cout << (H * W + 1) / 2 << endl;
14 }
15
16 return 0;
17 }


Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2
      | ^
a.cc:4:1: error: expected unqualified-id before numeric constant
    4 | 4 typedef long long ll;
      | ^
a.cc:5:1: error: expected unqualified-id before numeric constant
    5 | 5
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'h' was not declared in this scope
    7 |  cin>>h;
      |       ^
a.cc:8:7: error: 'w' was not declared in this scope
    8 |  cin>>w;
      |       ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	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:8:30: error: expected ';' before '}' token
    8 |                 cout << (H*W)//2 << endl;
      |                              ^
      |                              ;
    9 |     }
      |     ~                         
a.cc:11:31: error: expected ')' before '}' token
   11 |                 cout << ((H*W)//2 + 1) << endl;
      |                         ~     ^
      |                               )
   12 |     }
      |     ~                          
a.cc:11:31: error: expected ';' before '}' token
   11 |                 cout << ((H*W)//2 + 1) << endl;
      |                               ^
      |                               ;
   12 |     }
      |     ~
Language: C++

#include <iostream>
using namespace std;

int main(){
	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:8:28: error: expected ';' before '}' token
    8 |                 cout << H*W//2 << endl;
      |                            ^
      |                            ;
    9 |     }
      |     ~                       
a.cc:11:28: error: expected ';' before '}' token
   11 |                 cout << H*W//2 + 1 << endl;
      |                            ^
      |                            ;
   12 |     }
      |     ~
Language: C++

#include <iostream>
 
int main(){
	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:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         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:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |                 cout << H*W//2 << 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:10:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |                 cout << H*W//2 + 1 << endl;
      |                 ^~~~
      |                 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>

int main(){
	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:4:15: error: expected initializer before 'W'
    4 |         int H W;
      |               ^
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         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:5:16: error: 'H' was not declared in this scope
    5 |         cin >> H >> W;
      |                ^
a.cc:5:21: error: 'W' was not declared in this scope
    5 |         cin >> H >> W;
      |                     ^
a.cc:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |                 cout << H*W//2 << 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:10:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |                 cout << H*W//2 + 1 << endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C

/*
Anki:未済
作成日:①2020/03/14・2020/03/15
*/

#include <stdio.h>

int main()
{
    int h, w, range, reach;

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

    //奇数奇数or偶数偶数の組み合わせ
    range = i * j;
    if (i == 1 || j == 1)
        reach = 1;
    else if (range % 2 == 0)
        reach = range / 2;
    else
        reach = (range / 2) + 1;
    /*if( h % 2 == 1 && w % 2 == 1 ) //奇数奇数
    {
        reach = ( h / 2 + 1 ) * ( w / 2 + 1 ) + ( h / 2 ) * ( w / 2 );
    }
    else if ( h % 2 == 0 && w % 2 == 0 ) //偶数偶数
    {
        reach = ( h / 2 ) * ( w / 2 ) + ( h / 2 ) * ( w / 2 );
    }
    else if ( h % 2 == 1 && w % 2 == 0 ) //奇数偶数
    {
        reach = ( h / 2 ) * ( w / 2 + 1 ) + ( h / 2 ) * ( w / 2 );
    }
    else if (h % 2 == 0 &&w % 2 == 1) //偶数奇数
    {
        reach = (h / 2) * (w / 2) + (h / 2 + 1) * (w / 2);
    }*/

    printf("%d\n", reach);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:13: error: 'i' undeclared (first use in this function)
   15 |     range = i * j;
      |             ^
main.c:15:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:17: error: 'j' undeclared (first use in this function)
   15 |     range = i * j;
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define fast { ios :: sync_with_stdio(false); cin.tie(0); cout.tie(0); }
#define pb push_back
#define ll long long
 
#define vi vector<int>
#define vl vector<long>
#define vll vector<long long>
 
#define infi INT_MAX
#define infl LONG_LONG_MAX
#define f(i,a,b) for(ll i=a;i<b;i++)
#define fi(i,a,b) for(ll i=(b-1);i>=a;i--)
#define F first
#define S second
#define G(a,b) get<a>(b)
#define MP make_pair
#define MT make_tuple
#define pll pair<ll,ll> 
#define endl "\n"



void func()
{
  ll h,w;
  cin>>h>>w;
  ll ans=(h*w);
  if(ans%2==0) ans/=2;
  else 
  {
    ans=(((h-1)*w)/2)+(w/2)+1;
  }
  cout<<ans<<endl;
 
int main() 
{
    fast
    //freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
    
    ll ntc=1;
    //cin>>ntc;
 
    while(ntc)
    {
      func();
      ntc--;
    }
 
    return 0;
}

Compiler output:
a.cc: In function 'void func()':
a.cc:38:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   38 | int main()
      |         ^~
a.cc:38:9: note: remove parentheses to default-initialize a variable
   38 | int main()
      |         ^~
      |         --
a.cc:38:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:39:1: error: a function-definition is not allowed here before '{' token
   39 | {
      | ^
a.cc:53:2: error: expected '}' at end of input
   53 | }
      |  ^
a.cc:27:1: note: to match this '{'
   27 | {
      | ^
Language: C++

#include<iostream>

using namespace std;

int main(){
	long long int a,b;
  	cin>>a>>b;
  
  	cout<<ceil((a*b)/2);
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'ceil' was not declared in this scope
    9 |         cout<<ceil((a*b)/2);
      |               ^~~~
Language: C++

#include <bits/stdc++.h>
#define FOR(i, m, n) for (int i = m; i < (n); i++)
#define RFOR(i, m, n) for (int i = (m - 1); i >= 0; i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, n, 0)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
#define print(ele) cout << (ele) << endl
#define print10(ele) cout << fixed << setprecision(10) << (ele) << endl

using namespace std;
typedef long long ll;
typedef vector<int> ivec;
typedef vector<string> svec;
typedef vector<ll> lvec;

const int mod = 1e9 + 7;
const ll INF = 1000000000000000000LL;

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

  ll ans = (h * w + 1) / 2;
  if (mn == 1 || mx == 1) ans = 1;

  print(ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:7: error: 'mn' was not declared in this scope; did you mean 'yn'?
   25 |   if (mn == 1 || mx == 1) ans = 1;
      |       ^~
      |       yn
a.cc:25:18: error: 'mx' was not declared in this scope
   25 |   if (mn == 1 || mx == 1) ans = 1;
      |                  ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define lld long long int
#define M 1000000007
#define fors(i,n) for(int i=0;i<n;++i)
#define fore(i,a,b) for(int i=a;i<=b;++i)
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define vv vector<int>
#define endl "\n"
#define test(i) cout<<i<<endl
#define itrt int t; cin>>t; fors(i,t)
#define itr1 int t; cin>>t;
#define ff first
#define ss second
#define pb push_back
#define vmp make_pair
#define ppb pop_back
#define sorta(a,n) sort(arr,arr+n)
#define sortv(x) sort(x.begin(),x.end())
void file(){
    #ifdef LOCAL
    freopen("demo.in","r",stdin);
    freopen("demo.out","w",stdout);
    #endif
}
int main(){
    fastio;
    file();
    long long a,b;
    cin>>a>>b;
    if(w==1 || h==1){
        test("1");
    }
    else{
        test((a*b+1)/2);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:8: error: 'w' was not declared in this scope
   31 |     if(w==1 || h==1){
      |        ^
a.cc:31:16: error: 'h' was not declared in this scope
   31 |     if(w==1 || h==1){
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
    ll a,b;
    cin>>a>>b;
    ans=((a/2)*b)+(a%b);
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |     ans=((a/2)*b)+(a%b);
      |     ^~~
      |     abs
Language: C++

#include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define int long long #define pb push_back #define mp make_pair #define rep(i,a,b) for(int i=a;i<b;i++) #define print(x) cout<<x int32_t main() { IOS; int a,b; cin>>a>>b; print(((a*b)/2)+((a*b)%2!=0)); return 0; }

Compiler output:
a.cc:1:26: warning: extra tokens at end of #include directive
    1 | #include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define int long long #define pb push_back #define mp make_pair #define rep(i,a,b) for(int i=a;i<b;i++) #define print(x) cout<<x int32_t main() { IOS; int a,b; cin>>a>>b; print(((a*b)/2)+((a*b)%2!=0)); return 0; }
      |                          ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

// C++ implementation of above approach 
#include <bits/stdc++.h> 
using namespace std;
#define int long long 
  
// Function to return the count of 
// total positions the Bishop 
// can visit in a single move 
void countSquares(int row, int column) 
{ 
  
    // Count top left squares 
    int topLeft = min(row, column) - 1; 
  
    // Count bottom right squares 
    int bottomRight = 8 - max(row, column); 
  
    // Count top right squares 
    int topRight = min(row, 9 - column) - 1; 
  
    // Count bottom left squares 
    int bottomLeft = 8 - max(row, 9 - column); 
  
    // Return total count 
    cout<< (topLeft + topRight + bottomRight + bottomLeft); 
} 
  
// Driver code 
int main() 
{ 
  
    // Bishop's Position 
    int row, column ;
cin>>row>>coloumn; 
countSquares(row,coloumn);
  
     
  
    return 0; 
} 

Compiler output:
cc1plus: error: '::main' must return 'int'
a.cc: In function 'int main()':
a.cc:34:11: error: 'coloumn' was not declared in this scope; did you mean 'column'?
   34 | cin>>row>>coloumn;
      |           ^~~~~~~
      |           column
Language: C++

#include<iostream>
using namespace std;
int main()
{
    ll H,W;
cin >> H >> W;

if(H == 1 || W == 1){
   cout << 1 << endl;
 } else {
cout << (H * W + 1) / 2 << 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:8: error: 'H' was not declared in this scope
    6 | cin >> H >> W;
      |        ^
a.cc:6:13: error: 'W' was not declared in this scope
    6 | cin >> H >> W;
      |             ^
Language: C

#include <stdio.h>

int main(void){
    long int h, w, ans;

    scanf("%ld", &h);
    scanf("%ld", &w);

    if(h % 2 == 0){
        ans = w * h / 2;
    }

    else{
        ans = (w * (h / 2)) + (w / 2 + 1);
    }

    printf("%ld\n", ans);
    
    return 0;


Compiler output:
main.c: In function 'main':
main.c:19:5: error: expected declaration or statement at end of input
   19 |     return 0;
      |     ^~~~~~
Language: C

#include <stdio.h>

#define max 32

int main()
{
    long int N, H, all, count;
    
    scanf("%lld %lld", &N, &H);
    
    if(N==1||M==1){
        printf("%d", 1);
        return 0;
    }
    
    all=N*H;
    
    if(all%2==0)
        count=all/2;
    else
        count=all/2+1;
    
    printf("%lld", count);
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:14: error: 'M' undeclared (first use in this function)
   11 |     if(N==1||M==1){
      |              ^
main.c:11:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main()
{
	long long int H, W;
	
	scanf("%ld %ld", &H, &W);
	
	if(H%2 == 1 && W%2 == 1)
		printf"(%ld", H*W/2 + 1);
	
	else printf("%ld", H*W)
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:23: error: expected ';' before string constant
   11 |                 printf"(%ld", H*W/2 + 1);
      |                       ^~~~~~
      |                       ;
main.c:11:40: error: expected statement before ')' token
   11 |                 printf"(%ld", H*W/2 + 1);
      |                                        ^
main.c:13:9: error: 'else' without a previous 'if'
   13 |         else printf("%ld", H*W)
      |         ^~~~
main.c:13:32: error: expected ';' before 'return'
   13 |         else printf("%ld", H*W)
      |                                ^
      |                                ;
   14 | 
   15 |         return 0;
      |         ~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int h,w;
    cin >> h >> w;
  #include <bits/stdc++.h>
using namespace std;
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int h,w;
    cin >> h >> w;
  if ((h==1 && w>1) || (h>1 && w==1))  cout << 1;
   else if(h%2 == 1 && w%2 == 1) cout<< (h*w+1)/2  ;
   else  cout<< (h*w)/2 ;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   12 | int main() {
      |         ^~
a.cc:12:9: note: remove parentheses to default-initialize a variable
   12 | int main() {
      |         ^~
      |         --
a.cc:12:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:12:12: error: a function-definition is not allowed here before '{' token
   12 | int main() {
      |            ^
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int h,w;
    cin >> h >> w;
  #include <bits/stdc++.h>
using namespace std;
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int h,w;
    cin >> h >> w;
  if ((h==1 && w>1) || (h>1 && w==1)) {
        cout << 1 << "\n";
        return 0;
   else if(h%2 == 1 && w%2 == 1) cout<< (h*w+1)/2  ;
   else  cout<< (h*w)/2 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   12 | int main() {
      |         ^~
a.cc:12:9: note: remove parentheses to default-initialize a variable
   12 | int main() {
      |         ^~
      |         --
a.cc:12:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:12:12: error: a function-definition is not allowed here before '{' token
   12 | int main() {
      |            ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc =new Scanner(Sytem.in);
    int H=sc.nextInt();
    int W=sc.nextInt();
    System.out.println((H*W+1)/2);
  }
}

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

import java.util.*;
public class Main{
  public static void main(String[] args){
    int H=sc.nextInt();
    int W=sc.nextInt();
    System.out.println((H*W+1)/2);
  }
}

Compiler output:
Main.java:4: error: cannot find symbol
    int H=sc.nextInt();
          ^
  symbol:   variable sc
  location: class Main
Main.java:5: error: cannot find symbol
    int W=sc.nextInt();
          ^
  symbol:   variable sc
  location: class Main
2 errors