Result

AC

Duration

514ms

Code [DL]

a=[*map(int,open(0).read().split())]
print(-sum(a[i//2]*a[8-i//12*6-i%3]*a[(5<i<18)*6+3+(i+3)//2%3]^-(i%2)for i in range(24))//6-2)

stdin

90 44 01
81 10 98
20 91 04
32 21 08

stdout

67711

stderr