Language: C++

#include<bits/stdc++.h>
using namespace std ;
#define Next( i, x ) for( register int i = head[x]; i; i = e[i].next )
#define rep( i, s, t ) for( register int i = (s); i <= (t); ++ i )
#define drep( i, s, t ) for( register int i = (t); i >= (s); -- i )
#define re register
#define int long long
int gi() {
	char cc = getchar() ; int cn = 0, flus = 1 ;
	while( cc < '0' || cc > '9' ) {  if( cc == '-' ) flus = - flus ; cc = getchar() ; }
	while( cc >= '0' && cc <= '9' )  cn = cn * 10 + cc - '0', cc = getchar() ;
	return cn * flus ;
}
const int N = 500 + 5 ; 
const int M = 100 + 5 ; 
int T, n, A[N], b[M], bb[M] ;
char s[N] ;  
void solve( int l, int r, int type ) {
	if( type == 0 ) {
		rep( j, l, r ) {	
			int x = A[j] ; 
			for( re int i = 61; i >= 0; -- i ) {
				int u = ( 1ll << i ) ; 
				if( u & x ) {
					if( !bb[i] ) bb[i] = x, x = 0 ; 
					else x ^= bb[i] ;   
				}
			}
		}
		for( re int i = 61; i >= 0; -- i ) {
			if( !b[i] ) continue ; 
			int x = b[i] ; 
			for( re int j = 61; j >= 0; -- j ) {
				int u = ( 1ll << j ) ;
				if( u & x ) x ^= bb[j] ; 
			}
			if( !x ) b[i] = 0 ; 
		}	
		rep( i, 0, 65 ) bb[i] = 0 ;
	}
	else {
		rep( j, l, r ) {	
			int x = A[j] ; 
			for( re int i = 61; i >= 0; -- i ) {
				int u = ( 1ll << i ) ; 
				if( u & x ) {
					if( !b[i] ) b[i] = x, x = 0 ; 
					else x ^= b[i] ;   
				}
			}
		}
	}
} 
signed main()
{
	T = gi() ; 
	while( T-- ) {
		n = gi() ;
		rep( i, 1, n ) A[i] = gi() ; 
		scanf("%s", s + 1 ) ; s[n + 1] = '5' ; 
		int bef = 1 ; 
		rep( i, 1, n ) {
			st[++ top] = i ; 
			if( s[i] != s[i + 1] ) {
				if( s[i] == '0' ) solve(bef, i, 0) ;
				else solve(bef, i, 1) ;
				bef = i + 1 ; 
			}
		} 
		int flag = 0 ; 
		rep( i, 0, 61 ) if( b[i] ) flag = 1 ; 
		if( flag ) puts("1") ;
		else puts("0") ; 
		rep( i, 0, 65 ) b[i] = 0 ;
	}
	return 0 ;
}

Compiler output:
a.cc: In function 'void solve(long long int, long long int, long long int)':
a.cc:20:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   20 |                 rep( j, l, r ) {
      |                      ^
a.cc:4:42: note: in definition of macro 'rep'
    4 | #define rep( i, s, t ) for( register int i = (s); i <= (t); ++ i )
      |                                          ^
a.cc:22:37: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   22 |                         for( re int i = 61; i >= 0; -- i ) {
      |                                     ^
a.cc:30:29: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   30 |                 for( re int i = 61; i >= 0; -- i ) {
      |                             ^
a.cc:33:37: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   33 |                         for( re int j = 61; j >= 0; -- j ) {
      |                                     ^
a.cc:39:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   39 |                 rep( i, 0, 65 ) bb[i] = 0 ;
      |                      ^
a.cc:4:42: note: in definition of macro 'rep'
    4 | #define rep( i, s, t ) for( register int i = (s); i <= (t); ++ i )
      |                                          ^
a.cc:42:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   42 |                 rep( j, l, r ) {
      |                      ^
a.cc:4:42: note: in definition of macro 'rep'
    4 | #define rep( i, s, t ) for( register int i = (s); i <= (t); ++ i )
      |                                          ^
a.cc:44:37: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   44 |                         for( re int i = 61; i >= 0; -- i ) {
      |                                     ^
a.cc: In function 'int main()':
a.cc:59:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   59 |                 rep( i, 1, n ) A[i] = gi() ;
      |                      ^
a.cc:4:42: note: in definition of macro 'rep'
    4 | #define rep( i, s, t ) for( register int i = (s); i <= (t); ++ i )
      |                                          ^
a.cc:62:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   62 |                 rep( i, 1, n ) {
      |                      ^
a.cc:4:42: note: in definition of macro 'rep'
    4 | #define rep( i, s, t ) for( register int i = (s); i <= (t); ++ i )
      |                                          ^
a.cc:63:25: error: 'st' was not declared in this scope; did you mean 'std'?
   63 |                         st[++ top] = i ;
      |                         ^~
      |                         std
a.cc:63:31: error: 'top' was not declared in this scope
   63 |                         st[++ top] = i ;
      |                               ^~~
a.cc:71:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   71 |                 rep( i, 0, 61 ) if( b[i] ) flag = 1 ;
      |                      ^
a.cc:4:42: note: in definition of macro 'rep'
    4 | #define rep( i, s, t ) for( register int i = (s); i <= (t); ++ i )
      |                                          ^
a.cc:74:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   74 |                 rep( i, 0, 65 ) b[i] = 0 ;
      |                      ^
a.cc:4:42: note: in definition of macro 'rep'
    4 | #define rep( i, s, t ) for( register int i = (s); i <= (t); ++ i )
      |                                          ^