Result

AC

Duration

479ms

Code [DL]

X={}
x=0
for i=-3,8 do
X[i]=io.read("*n")-(X[i%3-3]or 0)if i>5 then p=-~i%3
q=~-i%3
x=x+X[i]*(X[p]*X[q+3]-X[q]*X[p+3])end
end
print(x//6)

stdin

59 76 93
04 48 37
14 61 86
04 57 02

stdout

5740

stderr

strace