Result

AC

Duration

1241ms

Code [DL]

import std.stdio;void main(){int[30]a;for(int i;readf(" %d",&a[i]);)a[i]-=a[i%3]*(i++>2);printf("%d",(a[3]*(a[7]*a[11]-a[8]*a[10])+a[4]*(a[8]*a[9]-a[11]*a[6])+a[5]*(a[10]*a[6]-a[7]*a[9]))/6);}

stdin

03 78 21
02 63 70
23 27 73
77 48 53

stdout

17913

stderr

strace