Result

AC

Duration

1236ms

Code [DL]

import std.stdio;void main(){int[30] a;int i=0;for(;readf(" %d",&a[i]);i++)a[i]-=a[i%3]*(i>2);printf("%d\n",(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

66 82 84
74 53 02
68 07 89
40 77 73

stdout

28442

stderr

strace