AMC 10B 2022 Problem 18

Consider systems of three linear equations with unknowns x, y, and z,

a_{1} x+b_{1} y+c_{1} z=0
a_{2} x+b_{2} y+c_{2} z=0
a_{3} x+b_{3} y+c_{3} z=0

where each of the coefficients is either 0 or 1 and the system has a solution other than x=y=z=0. For example, one such system is \{1 x+1 y+0 z=0,0 x+1 y+1 z=0,0 x+0 y+0 z=0\}
with a nonzero solution of \{x, y, z\}=\{1,-1,1\}. How many such systems are there? (The equations in a system need not be distinct, and two systems containing the same equations in a different order are considered different.)

Answer Choices
A. 302
B. 338
C. 340
D. 343
E. 344