| 122 | return ans; |
| 123 | } |
| 124 | int main() |
| 125 | { |
| 126 | int n,p=0,t,k; |
| 127 | cin>>t; |
| 128 | while(t--) |
| 129 | { |
| 130 | p=0; |
| 131 | cin>>n>>k; |
| 132 | int arr[n]; |
| 133 | for(int i=0;i<n;i++) |
| 134 | { |
| 135 | cin>>arr[i]; |
| 136 | } |
| 137 | trienode* head=new trienode(); |
| 138 | insert(0,head); |
| 139 | long long int ans=0; |
| 140 | for(int i=0;i<n;i++) |
| 141 | { |
| 142 | p=p^arr[i]; |
| 143 | ans+=find_max_xor(head,p,k); |
| 144 | insert(p,head); |
| 145 | } |
| 146 | cout<<ans<<endl; |
| 147 | } |
| 148 | return 0; |
| 149 | } |
| 150 | |
| 151 |
nothing calls this directly
no test coverage detected