func_code_string: #include <bits/stdc++.h>   using namespace std;   const int dx[] = {-1, -2, -2, -1, 1, 2, 2, 1};   const int dy[] = {-2, -1, 1, 2, 2, 1, -1, -2};   set<pair<int, pair<int, int> > > heap;   vector<vector<int> > now;   int main() {     int n, m;     cin >> n >> m;     if (n >= 10 && m >= 10) {       cout << (m * n + 1) / 2 << endl;       return 0;     }     now.assign(n, vector<int>(m, 0));     for (int i = 0; i < n; i++)       for (int j = 0; j < m; j++) {         int cnt = 1;         for (int k = 0; k < 8; k++) {           int nx = i + dx[k];           int ny = j + dy[k];           if (nx < 0 || nx >= n || ny < 0 || ny >= m) continue;           cnt++;         }         heap.insert(make_pair(cnt, make_pair(i, j)));         now[i][j] = cnt;       }     int ans = 0;     while (!heap.empty()) {       pair<int, pair<int, int> > v = *heap.begin();       heap.erase(heap.begin());       ans++;       int x = v.second.first;       int y = v.second.second;       for (int i = 0; i < 8; i++) {         int nx = x + dx[i];         int ny = y + dy[i];         if (nx < 0 || nx >= n || ny < 0 || ny >= m) continue;         int cnt = now[nx][ny];         if (heap.count(make_pair(cnt, make_pair(nx, ny)))) {           heap.erase(make_pair(cnt, make_pair(nx, ny)));           for (int j = 0; j < 8; j++) {             int x = nx + dx[j];             int y = ny + dy[j];             if (x < 0 || x >= n || y < 0 || y >= m) continue;             int cnt = now[x][y];             if (heap.count(make_pair(cnt, make_pair(x, y)))) {               heap.erase(make_pair(cnt, make_pair(x, y)));               now[x][y]--;               cnt--;               heap.insert(make_pair(cnt, make_pair(x, y)));             }           }         }       }     }     cout << max(ans, (m * n + 1) / 2) << endl;     return 0;   }   