Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ALL(x) (x).begin(),(x).end()
#define COUT(x) cout<<(x)<<"\n"
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define REP(i,n) for(int i=0;i<n;i++)
#define YES(x) cout<<(x?"YES":"NO")<<"\n"
#define Yes(x) cout<<(x?"Yes":"No")<<"\n"
#define dump(x) cout<<#x<<" = "<<(x)<<"\n"
#define endl "\n"
using G = vector<vector<int>>;
using M = map<int,int>;
using P = pair<int,int>;
using PQ = priority_queue<int>;
using PQG = priority_queue<int,vector<int>,greater<int>>;
using V = vector<int>;
using ll = long long;
using edge = struct { int to; int cost; };
template<class T>bool chmax(T &a,const T &b) {if(a<b){a=b; return 1;} return 0;}
template<class T>bool chmin(T &a,const T &b) {if(b<a){a=b; return 1;} return 0;}
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;

int a,b;
const int size = 100;
const int h=size,w=size;
char g[h][w];

int main() {
  IOS;
  cin >> a >> b;
  a--; b--;

  REP(i,h) REP(j,w) {
    g[i][j] = i<h/2 ? '#' : '.';
  }

  for (int i = 0; i < h; i+=2) {
    if (h/2+(h/2%2) == i) swap(a,b);
    for (int j = 0; j < w; j+=2) {
      if (a==0) break;
      g[i][j] = g[i][j] == '.' ? '#' : '.';
      a--;
    }
  }

  cout << h << " " << w << endl;
  REP(i,h) REP(j,w) {
    cout << g[i][j];
    j == w-1 && cout << endl;
  }
  return 0;
}

Compiler output:
a.cc:27:13: error: reference to 'size' is ambiguous
   27 | const int h=size,w=size;
      |             ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:26:11: note:                 'const int size'
   26 | const int size = 100;
      |           ^~~~
a.cc:28:11: error: 'w' was not declared in this scope
   28 | char g[h][w];
      |           ^
a.cc: In function 'int main()':
a.cc:35:18: error: 'w' was not declared in this scope
   35 |   REP(i,h) REP(j,w) {
      |                  ^
a.cc:6:32: note: in definition of macro 'REP'
    6 | #define REP(i,n) for(int i=0;i<n;i++)
      |                                ^
a.cc:36:5: error: 'g' was not declared in this scope
   36 |     g[i][j] = i<h/2 ? '#' : '.';
      |     ^
a.cc:41:25: error: 'w' was not declared in this scope
   41 |     for (int j = 0; j < w; j+=2) {
      |                         ^
a.cc:43:7: error: 'g' was not declared in this scope
   43 |       g[i][j] = g[i][j] == '.' ? '#' : '.';
      |       ^
a.cc:48:23: error: 'w' was not declared in this scope
   48 |   cout << h << " " << w << endl;
      |                       ^
a.cc:50:13: error: 'g' was not declared in this scope
   50 |     cout << g[i][j];
      |             ^