include iostream include vector include algorithm include cstdio inclu

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <string>
#include <cmath>
#include <iomanip>
#include <queue>
using namespace std;
int mat[3][3] = {0};
int main() {
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
for (int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++)
cin >> mat[i][j];
long long a = 0;
a += mat[0][0] * (mat[1][1] * mat[2][2] - mat[1][2] * mat[2][1]);
a -= mat[0][1] * (mat[1][0] * mat[2][2] - mat[1][2] * mat[2][0]);
a += mat[0][2] * (mat[1][0] * mat[2][1] - mat[1][1] * mat[2][0]);
cout << a << endl;
return 0;
}