Skip to content

Commit ad81b6f

Browse files
committed
Create A_Domino_piling.cpp
1 parent 3f8d7cd commit ad81b6f

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

A_Domino_piling.cpp

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
2+
#include<bits/stdc++.h>
3+
4+
using namespace std;
5+
#define gc getchar_unlocked
6+
#define fo(i,n) for(int i=0;i<n;i++)
7+
#define Fo(i,k,n) for(int i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
8+
#define ll long long
9+
#define si(x) scanf("%d",&x)
10+
#define sl(x) scanf("%lld",&x)
11+
#define ss(s) scanf("%s",s)
12+
#define pi(x) printf("%d\n",x)
13+
#define pl(x) printf("%lld\n",x)
14+
#define ps(s) printf("%s\n",s)
15+
#define deb(x) cout << #x << "=" << x << endl
16+
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
17+
#define all(x) x.begin(), x.end()
18+
#define clr(x) memset(x, 0, sizeof(x))
19+
#define sortall(x) sort(all(x))
20+
#define PI 3.1415926535897932384626
21+
typedef pair<int, int> pii;
22+
typedef vector<int> vi;
23+
typedef vector<pii> vpii;
24+
typedef vector<vi> vvi;
25+
//=======================
26+
mt19937_64 rang(chrono::high_resolution_clock::now().time_since_epoch().count());
27+
int rng(int lim) {
28+
uniform_int_distribution<int> uid(0,lim-1);
29+
return uid(rang);
30+
}
31+
const int mod = 1000000007;
32+
const int N = 2e6+13, M = N;
33+
34+
int mpow(int base, int exp);
35+
//=======================
36+
vi g[N];
37+
int a[N];
38+
int n, m, k;
39+
//=======================
40+
41+
void solve() {
42+
cin >> n>>m;
43+
n=n*m;
44+
if(n%2!=0){
45+
n--;
46+
}
47+
cout<<n/2<<endl;
48+
}
49+
50+
int main() {
51+
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
52+
srand(chrono::high_resolution_clock::now().time_since_epoch().count());
53+
54+
solve();
55+
56+
return 0;
57+
}
58+
int mpow(int base, int exp) {
59+
base %= mod;
60+
int result = 1;
61+
while (exp > 0) {
62+
if (exp & 1) result = ((ll)result * base) % mod;
63+
base = ((ll)base * base) % mod;
64+
exp >>= 1;
65+
}
66+
return result;
67+
}
68+

0 commit comments

Comments
 (0)