Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
#define si scanf
#define so printf
#define N 100100
#define M 
#define INF  
template<typename TP>inline bool rd(TP& r)
{
	r=0;
	char tmp=getchar();
	while(tmp<'0'||tmp>'9')
	{
		if(tmp==EOF)
			return 0;
		tmp=getchar();
	}
	while('0'<=tmp&&tmp<='9')
	{
		r=(r<<3)+(r<<1)+tmp-'0';
		tmp=getchar();
	}
	return 1;
	
} 
int n;
long long L;
int ch[N][2],f[N],c[N],tot=1;
bool end[N];
int s[N];
void trie()
{
	int now=1;
	for(int i=1;i<=s[0];++i)
	{
		if(ch[now][s[i]]==0)
		{
			ch[now][s[i]]=++tot;
			f[tot]=now;
			c[tot]=s[i];
		}
		now=ch[now][s[i]];
	}
	end[now]=1;
}
long long ans=0;
long long calc(long long dp)
{
	int t=0;
	while((dp&1)==0)
	{
		++t;
		dp>>=1;
	}
	return 1<<t;
}
int d[N];
void dfs(int now)
{
	d[now]=d[f[now]]+1;
	if(end[now])
		return;
	if(ch[now][0]==0)
		ans^=calc(L-d[now]+1);
	else
		dfs(ch[now][0]);
	if(ch[now][1]==0)
		ans^=calc(L-d[now]+1);
	else
		dfs(ch[now][1]);
}
int main()
{
	rd(n),rd(L);
	char in[N];
	int lth;
	for(int i=1;i<=n;++i)
	{
		si("%s\n",in+1);
		lth=strlen(in+1);
		for(int j=1;j<=lth;++j)
			s[j]=in[j]-'0';
		s[0]=lth;
		trie();
	}
	d[1]=0;
	dfs(1);
	if(ans)
		so("Alice\n");
	else
		so("Bob\n");
	return 0;
} 

Compiler output:
a.cc: In function 'void trie()':
a.cc:46:9: error: reference to 'end' is ambiguous
   46 |         end[now]=1;
      |         ^~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:116:37: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
  116 |   template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
      |                                     ^~~
/usr/include/c++/14/bits/range_access.h:115:31: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
  115 |   template<typename _Tp> _Tp* end(valarray<_Tp>&) noexcept;
      |                               ^~~
/usr/include/c++/14/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/usr/include/c++/14/bits/range_access.h:85:5: note:                 'template<class _Container> constexpr decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:74:5: note:                 'template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
In file included from /usr/include/c++/14/bits/range_access.h:36:
/usr/include/c++/14/initializer_list:99:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
   99 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
a.cc:31:6: note:                 'bool end [100100]'
   31 | bool end[N];
      |      ^~~
a.cc: In function 'void dfs(int)':
a.cc:63:12: error: reference to 'end' is ambiguous
   63 |         if(end[now])
      |            ^~~
/usr/include/c++/14/bits/range_access.h:116:37: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
  116 |   template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
      |                                     ^~~
/usr/include/c++/14/bits/range_access.h:115:31: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
  115 |   template<typename _Tp> _Tp* end(valarray<_Tp>&) noexcept;
      |                               ^~~
/usr/include/c++/14/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/usr/include/c++/14/bits/range_access.h:85:5: note:                 'template<class _Container> constexpr decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:74:5: note:                 'template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/initializer_list:99:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
   99 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
a.cc:31:6: note:                 'bool end [100100]'
   31 | bool end[N];
      |      ^~~