I think that linear algebra, is a unnecessarily intimidating tool, to solve a problem I believe is far easier, and needlessly intimidates those without formal knowledge of linear algebra, which is a significant part of codeforces. I know I did. Therefore I want to show a step by step problem solving process that will lead to the concept of linear basis at the end, with no formal knowledge required.
We start with the elementary problem of linear basis. Given an array $$$[a_1, a_2, \ldots a_n]$$$, where $$$a_i \le 2^d$$$, find the number of distinct