Result

AC

Duration

1361ms

Code [DL]

import std.stdio;void main(){int p,x,i;for(int[12]X;readf("%d ",p);)x+=i/9*(X[i]=p-X[i%3])*(X[++i%3+3]*X[p=-~i%3+6]-X[i%3+6]*X[p-3]);write(x/6);}

stdin

95 09 53
84 04 24
06 70 67
92 78 39

stdout

33207

stderr

strace