Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define dd double
#define endl "\n"
#define pb push_back
#define all(v) v.begin(),v.end()
#define mp make_pair
#define fi first
#define se second
#define fo(i,n) for(int i=0;i<n;i++)
#define fo1(i,n) for(int i=1;i<=n;i++)
ll mod=1000000007;
ll n,k,t,m,q,flag=0;
ll po(ll k ,ll n,ll ans,ll temp,ll ans1){
    if(n==0)return ans;
    while(temp<=n){
        ans*=ans1;ans%=mod;ans1=ans1*ans1;ans1%=mod;n=n-temp;temp*=2;
    }
    return po(k,n,ans,1,k)%mod;
    //eg. po(2,78,1,1,2);
}
ll min(ll a,ll b){if(a>b)return b;else return a;}
ll max(ll a,ll b){if(a>b)return a;else return b;}
int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    //cin>>t;
    t=1;
    while(t--){
        ll h,w;
        cin>>h>>w;
        if(h==1)cout<<1;
        else {
            if(h%2==0)cout<<(h/2)*w;
            else cout<<(h/2)*w + (w+1)/2;
        }
    }

    return 0;
}
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define dd double
#define endl "\n"
#define pb push_back
#define all(v) v.begin(),v.end()
#define mp make_pair
#define fi first
#define se second
#define fo(i,n) for(int i=0;i<n;i++)
#define fo1(i,n) for(int i=1;i<=n;i++)
ll mod=1000000007;
ll n,k,t,m,q,flag=0;
ll po(ll k ,ll n,ll ans,ll temp,ll ans1){
    if(n==0)return ans;
    while(temp<=n){
        ans*=ans1;ans%=mod;ans1=ans1*ans1;ans1%=mod;n=n-temp;temp*=2;
    }
    return po(k,n,ans,1,k)%mod;
    //eg. po(2,78,1,1,2);
}
ll min(ll a,ll b){if(a>b)return b;else return a;}
ll max(ll a,ll b){if(a>b)return a;else return b;}
int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    
    //cin>>t;
    t=1;
    while(t--){
        ll h,w;
        cin>>h>>w;
        if(h==1)cout<<1;
        else {
            if(h%2==0)cout<<(h/2)*w;
            else cout<<(h/2)*w + (w+1)/2;
        }
    }

    return 0;
}


Compiler output:
a.cc:58:4: error: redefinition of 'long long int mod'
   58 | ll mod=1000000007;
      |    ^~~
a.cc:13:4: note: 'long long int mod' previously defined here
   13 | ll mod=1000000007;
      |    ^~~
a.cc:59:4: error: redefinition of 'long long int n'
   59 | ll n,k,t,m,q,flag=0;
      |    ^
a.cc:14:4: note: 'long long int n' previously declared here
   14 | ll n,k,t,m,q,flag=0;
      |    ^
a.cc:59:6: error: redefinition of 'long long int k'
   59 | ll n,k,t,m,q,flag=0;
      |      ^
a.cc:14:6: note: 'long long int k' previously declared here
   14 | ll n,k,t,m,q,flag=0;
      |      ^
a.cc:59:8: error: redefinition of 'long long int t'
   59 | ll n,k,t,m,q,flag=0;
      |        ^
a.cc:14:8: note: 'long long int t' previously declared here
   14 | ll n,k,t,m,q,flag=0;
      |        ^
a.cc:59:10: error: redefinition of 'long long int m'
   59 | ll n,k,t,m,q,flag=0;
      |          ^
a.cc:14:10: note: 'long long int m' previously declared here
   14 | ll n,k,t,m,q,flag=0;
      |          ^
a.cc:59:12: error: redefinition of 'long long int q'
   59 | ll n,k,t,m,q,flag=0;
      |            ^
a.cc:14:12: note: 'long long int q' previously declared here
   14 | ll n,k,t,m,q,flag=0;
      |            ^
a.cc:59:14: error: redefinition of 'long long int flag'
   59 | ll n,k,t,m,q,flag=0;
      |              ^~~~
a.cc:14:14: note: 'long long int flag' previously defined here
   14 | ll n,k,t,m,q,flag=0;
      |              ^~~~
a.cc:60:4: error: redefinition of 'long long int po(long long int, long long int, long long int, long long int, long long int)'
   60 | ll po(ll k ,ll n,ll ans,ll temp,ll ans1){
      |    ^~
a.cc:15:4: note: 'long long int po(long long int, long long int, long long int, long long int, long long int)' previously defined here
   15 | ll po(ll k ,ll n,ll ans,ll temp,ll ans1){
      |    ^~
a.cc:68:4: error: redefinition of 'long long int min(long long int, long long int)'
   68 | ll min(ll a,ll b){if(a>b)return b;else return a;}
      |    ^~~
a.cc:23:4: note: 'long long int min(long long int, long long int)' previously defined here
   23 | ll min(ll a,ll b){if(a>b)return b;else return a;}
      |    ^~~
a.cc:69:4: error: redefinition of 'long long int max(long long int, long long int)'
   69 | ll max(ll a,ll b){if(a>b)return a;else return b;}
      |    ^~~
a.cc:24:4: note: 'long long int max(long long int, long long int)' previously defined here
   24 | ll max(ll a,ll b){if(a>b)return a;else return b;}
      |    ^~~
a.cc:70:5: error: redefinition of 'int main()'
   70 | int main() {
      |     ^~~~
a.cc:25:5: note: 'int main()' previously defined here
   25 | int main() {
      |     ^~~~