Language: C++

#include <cstdio>
#include <vector>
#include <algorithm>
#include <functional>
#include <map>
#include <set>
#include <string>
#include <iostream>
#include <cassert>
#include <cmath>
using namespace std;

struct node_t {
        shared_ptr<node_t> left, right;
        node_t(shared_ptr<node_t> l, shared_ptr<node_t> r) : left(l), right(r) {}
};

using node = shared_ptr<node_t>;

node new_node() {
        return node(new node_t(NULL, NULL));
}

int main() {
        int n;
        long long l;
        scanf("%d %lld", &n, &l);
        vector<string> s(n);
        for (int i = 0; i < n; i ++) {
                cin >> s[i];
        }
        node root = new_node();
        function<void (node, string, int)> dfs = [&](node u, string str, int depth) {
                if (depth >= str.size()) {
                        return;
                }
                if (str[depth] == '0') {
                        if (u->left == NULL) {
                                u->left = new_node();
                        }
                        dfs(u->left, str, depth + 1);
                } else {
                        if (u->right == NULL) {
                                u->right = new_node();
                        }
                        dfs(u->right, str, depth + 1);
                }
        };
        for (int i = 0; i < n; i ++) {
                dfs(root, s[i], 0);
        }
        function<long long (long long)> get_grundy = [&](long long x) {
                int ctz = __builtin_ctzll(x);
                return 1LL << ctz;
        };
        long long ans = 0;
        function<void (node, int)> dfs2 = [&](node u, int depth) {
                if (u->left == NULL) {
                        ans ^= get_grundy(l - depth);
                } else {
                        dfs2(u->left, depth + 1);
                }
                if (u->right == NULL) {
                        ans ^= get_grundy(l - depth);
                } else {
                        dfs2(u->right, depth + 1);
                }
        };
        dfs2(root, 0);
        puts(ans ? "Alice" : "Bob");
        return 0;
}


Compiler output:
a.cc:14:9: error: 'shared_ptr' does not name a type
   14 |         shared_ptr<node_t> left, right;
      |         ^~~~~~~~~~
a.cc:15:26: error: expected ')' before '<' token
   15 |         node_t(shared_ptr<node_t> l, shared_ptr<node_t> r) : left(l), right(r) {}
      |               ~          ^
      |                          )
a.cc:18:14: error: 'shared_ptr' does not name a type
   18 | using node = shared_ptr<node_t>;
      |              ^~~~~~~~~~
a.cc:20:1: error: 'node' does not name a type; did you mean 'node_t'?
   20 | node new_node() {
      | ^~~~
      | node_t
a.cc: In function 'int main()':
a.cc:32:9: error: 'node' was not declared in this scope; did you mean 'node_t'?
   32 |         node root = new_node();
      |         ^~~~
      |         node_t
a.cc:33:41: error: expression list treated as compound expression in functional cast [-fpermissive]
   33 |         function<void (node, string, int)> dfs = [&](node u, string str, int depth) {
      |                                         ^
a.cc:33:42: error: template argument 1 is invalid
   33 |         function<void (node, string, int)> dfs = [&](node u, string str, int depth) {
      |                                          ^
a.cc:33:54: error: 'node' is not a type
   33 |         function<void (node, string, int)> dfs = [&](node u, string str, int depth) {
      |                                                      ^~~~
a.cc: In lambda function:
a.cc:38:30: error: base operand of '->' is not a pointer
   38 |                         if (u->left == NULL) {
      |                              ^~
a.cc:39:34: error: base operand of '->' is not a pointer
   39 |                                 u->left = new_node();
      |                                  ^~
a.cc:39:43: error: 'new_node' was not declared in this scope
   39 |                                 u->left = new_node();
      |                                           ^~~~~~~~
a.cc:41:30: error: base operand of '->' is not a pointer
   41 |                         dfs(u->left, str, depth + 1);
      |                              ^~
a.cc:41:28: error: expression cannot be used as a function
   41 |                         dfs(u->left, str, depth + 1);
      |                         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:43:30: error: base operand of '->' is not a pointer
   43 |                         if (u->right == NULL) {
      |                              ^~
a.cc:44:34: error: base operand of '->' is not a pointer
   44 |                                 u->right = new_node();
      |                                  ^~
a.cc:44:44: error: 'new_node' was not declared in this scope
   44 |                                 u->right = new_node();
      |                                            ^~~~~~~~
a.cc:46:30: error: base operand of '->' is not a pointer
   46 |                         dfs(u->right, str, depth + 1);
      |                              ^~
a.cc:46:28: error: expression cannot be used as a function
   46 |                         dfs(u->right, str, depth + 1);
      |                         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:33:50: error: cannot convert 'main()::<lambda(int, std::string, int)>' to 'int' in initialization
   33 |         function<void (node, string, int)> dfs = [&](node u, string str, int depth) {
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                  |
      |                                                  main()::<lambda(int, std::string, int)>
   34 |                 if (depth >= str.size()) {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~        
   35 |                         return;
      |                         ~~~~~~~                   
   36 |                 }
      |                 ~                                 
   37 |                 if (str[depth] == '0') {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~          
   38 |                         if (u->left == NULL) {
      |                         ~~~~~~~~~~~~~~~~~~~~~~    
   39 |                                 u->left = new_node();
      |                                 ~~~~~~~~~~~~~~~~~~~~~
   40 |                         }
      |                         ~                         
   41 |                         dfs(u->left, str, depth + 1);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   42 |                 } else {
      |                 ~~~~~~~~                          
   43 |                         if (u->right == NULL) {
      |                         ~~~~~~~~~~~~~~~~~~~~~~~   
   44 |                                 u->right = new_node();
      |                                 ~~~~~~~~~~~~~~~~~~~~~~
   45 |                         }
      |                         ~                         
   46 |                         dfs(u->right, str, depth + 1);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   47 |                 }
      |                 ~                                 
   48 |         };
      |         ~                                         
a.cc:50:21: error: 'root' was not declared in this scope
   50 |                 dfs(root, s[i], 0);
      |                     ^~~~
a.cc:50:20: error: 'dfs' cannot be used as a function
   50 |                 dfs(root, s[i], 0);
      |                 ~~~^~~~~~~~~~~~~~~
a.cc:57:33: error: expression list treated as compound expression in functional cast [-fpermissive]
   57 |         function<void (node, int)> dfs2 = [&](node u, int depth) {
      |                                 ^
a.cc:57:34: error: template argument 1 is invalid
   57 |         function<void (node, int)> dfs2 = [&](node u, int depth) {
      |                                  ^
a.cc:57:47: error: 'node' is not a type
   57 |         function<void (node, int)> dfs2 = [&](node u, int depth) {
      |                                               ^~~~
a.cc: In lambda function:
a.cc:58:22: error: base operand of '->' is not a pointer
   58 |                 if (u->left == NULL) {
      |                      ^~
a.cc:61:31: error: base operand of '->' is not a pointer
   61 |                         dfs2(u->left, depth + 1);
      |                               ^~
a.cc:61:29: error: expression cannot be used as a function
   61 |                         dfs2(u->left, depth + 1);
      |                         ~~~~^~~~~~~~~~~~~~~~~~~~
a.cc:63:22: error: base operand of '->' is not a pointer
   63 |                 if (u->right == NULL) {
      |                      ^~
a.cc:66:31: error: base operand of '->' is not a pointer
   66 |                         dfs2(u->right, depth + 1);
      |                               ^~
a.cc:66:29: error: expression cannot be used as a function
   66 |                         dfs2(u->right, depth + 1);
      |                         ~~~~^~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:57:43: error: cannot convert 'main()::<lambda(int, int)>' to 'int' in initialization
   57 |         function<void (node, int)> dfs2 = [&](node u, int depth) {
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                           |
      |                                           main()::<lambda(int, int)>
   58 |                 if (u->left == NULL) {
      |                 ~~~~~~~~~~~~~~~~~~~~~~     
   59 |                         ans ^= get_grundy(l - depth);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   60 |                 } else {
      |                 ~~~~~~~~                   
   61 |                         dfs2(u->left, depth + 1);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~
   62 |                 }
      |                 ~                          
   63 |                 if (u->right == NULL) {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~    
   64 |                         ans ^= get_grundy(l - depth);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   65 |                 } else {
      |                 ~~~~~~~~                   
   66 |                         dfs2(u->right, depth + 1);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~
   67 |                 }
      |                 ~                          
   68 |         };
      |         ~                                  
a.cc:69:14: error: 'root' was not declared in this scope
   69 |         dfs2(root, 0);
      |              ^~~~
a.cc:69:13: error: 'dfs2' cannot be used as a function
   69 |         dfs2(root, 0);
      |         ~~~~^~~~~~~~~