Result

WA

Duration

842ms

Code [DL]

using System;using System.Linq;class A{static void Main(){char[]c={' ','\n'};int[]a=Console.In.ReadToEnd().Split(c).Take(12).Select(Int32.Parse).ToArray();int s=0,p=0,q=0;for(int z=8;z-->0;a[z%9]-=a[9+z%3],s+=a[z%3]*=a[p=3+(z+1)%3]*a[q=6+(z+2)%3]-a[q-3]*a[p+3]);Console.Write(s/6);}}

stdin

10 62 05
40 08 93
71 08 23
78 77 67

stdout

3277394

stderr

strace