Result

AC

Duration

507ms

Code [DL]

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

stdin

53 07 53
48 62 44
11 26 39
49 83 55

stdout

5039

stderr