Language: C++

#include <iostream>
#include <iomanip>
#include <climits>
#include <algorithm>
#include <vector>
#include <deque>
#include <queue>
#include <list>
#include <stack>
#include <string>
#include <functional>
#include <numeric>
#include <unordered_map>
#include <map>
#include <set>
#include <cstdlib>
#include <bitset>
#include <random>
#define _USE_MATH_DEFINES
#include <math.h>
#include <complex>

using namespace std;

#define INF (int)1e8
#define _INF (int)-1e8
#define INFLL (long long)1e15
#define _INFLL (long long)-1e15
#define Loop(i, n) for(int i = 0; i < (int)n; i++)
#define Loop1(i, n) for(int i = 1; i <= (int)n; i++)
#define Loopr(i, n) for(int i = (int)n - 1; i >= 0; i--)
#define Loopr1(i, n) for(int i = (int)n; i >= 1; i--)
#define bitmanip(m,val) static_cast<bitset<(int)m>>(val)
typedef long long int ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef pair<int, int> P;

/*******************************************************/

class MakeStrTree {
private:
  struct node {
    char val; node *left; node *right; ll deg;
  };
  ll n;
  node *root;
  node *empty;
public:
  MakeStrTree(vector<string> s) {
    n = s.size();
    root = new node;
    empty = new node;
    empty->val = '2';
    empty->left = empty;
    empty->right = empty;
    empty->deg = -1;
    *root = *empty;
    root->val = '9';
    root->deg = 0;
    Loop(i, n) {
      node *focus = root;
      Loop(j, s[i].length()) {
        char c = s[i][j];
        if (c == '0') {
          if (focus->left->val == '2') {
            node *lbuf = new node;
            *lbuf = *empty;
            lbuf->val = c;
            lbuf->deg = focus->deg + 1;
            focus->left = lbuf;
            if (focus->right->val == '2') {
              node *rbuf = new node;
              *rbuf = *empty;
              rbuf->val = '2';
              rbuf->deg = focus->deg + 1;
              focus->right = rbuf;
            }
          }
          focus = focus->left;
        }
        else {
          if (focus->right->val == '2') {
            node *rbuf = new node;
            *rbuf = *empty;
            rbuf->val = c;
            rbuf->deg = focus->deg + 1;
            focus->right = rbuf;
            if (focus->left->val == '2') {
              node *lbuf = new node;
              *lbuf = *empty;
              lbuf->val = '2';
              lbuf->deg = focus->deg + 1;
              focus->left = lbuf;
            }
          }
          focus = focus->right;
        }
      }
    }
  }
  pair<ll, ll> find_emptynode(ll l) {
    pair<ll, ll> ret = { 0,0 };
    stack<node*> stk;
    stk.push(root);
    while (stk.size()) {
      node* buf = stk.top(); stk.pop();
      if (buf->val == '2') {
        ret.first++;
        ret.second += ((l - buf->deg) % 2 == 0) ? 0 : 1;
      }
      if (buf->left->val == '2' && buf->right->val == '2') continue;
      stk.push(buf->left);
      stk.push(buf->right);
    }
    return ret;
  }
};

ll main() {
  ll n; ll l; cin >> n >> l;
  vector<string> s(n);
  Loop(i, n) cin >> s[i];
  MakeStrTree strtree(s);
  pair<ll, ll> v = strtree.find_emptynode(l);
  if (v.first % 2 == 0 && v.second % 2 == 0) cout << "Bob" << endl;
  else cout << "Alice" << endl;
}

Compiler output:
a.cc:122:1: error: '::main' must return 'int'
  122 | ll main() {
      | ^~