public static void Main()
var possibilities = new[]
new[] {1, 1, 0, 1, 1, 0, 0, 0},
new[] {1, 1, 0, 1, 1, 0, 0, 1},
new[] {0, 1, 1, 0, 1, 1, 0, 1}
int size = possibilities[0].Length;
var a = possibilities.SelectMany(x => x).GroupBy(x => i++ % size)
.Select(x => x.Any(z => z == 0) ? 0 : 1);
Console.WriteLine("["+string.Join(", ", a)+"]");
int j = 0, Size = possibilities[0].Length;
int[] result = new int[size];
for (int I = 0; I < size; I++)
for (j = 0; j < possibilities.Length; j++)
if (possibilities[j][I] == 0) { result[I] = 0; break; }
if (j == possibilities.Length) result [I] = 1;
Console.WriteLine("["+string.Join(", ", result)+"]");
var a2 = possibilities.SelectMany(x => x).GroupBy(x => i++ % size)
.Select(x => x.All(z => z == 0) || x.All(z => z == 1) ? 1 : 0);
Console.WriteLine("["+string.Join(", ", a2)+"]");
int size3 = possibilities[0].Length;
int[] result3 = new int[size];
for (int i3 = 0; i3 < size; i3++)
int q = possibilities[0][i3];
for (j = 1; j < possibilities.Length; j++)
if (possibilities[j][i3] != q) { result[i3] = 0; break; }
if (j == possibilities.Length) result3 [i3] = 1;
Console.WriteLine("["+string.Join(", ", result3)+"]");