Result

AC

Duration

979ms

Code [DL]

use std::io::Read;fn main(){let mut b=String::new();std::io::stdin().read_to_string(&mut b).unwrap();let mut x:Vec<i32>=b.trim().split(|c|c=='\n'||c==' ').map(|e| e.parse().ok().unwrap()).collect();for i in 0..9{x[i+3]-= x[i%3];}print!("{}",(x[11]*(x[7]*x[3]-x[4]*x[6])+x[10]*(x[5]*x[6]-x[3]*x[8])+x[9]*(x[4]*x[8]-x[7]*x[5]))/6);}

stdin

74 17 89
08 56 86
73 54 25
80 27 41

stdout

9804

stderr

strace