Result

AC

Duration

493ms

Code [DL]

s=[*map(int,open(0).read().split())]
j,k,l,a,b,c,d,e,f,g,h,i=[s[i]-s[i%3]for i in range(12)]
print((a*e*i+b*f*g+c*d*h-a*h*f-b*i*d-c*g*e)//6)

stdin

62 92 41
87 44 32
07 63 65
20 62 47

stdout

7051

stderr

strace