矩阵行列式计算
遇见zkx (^-^)
#include <set>
#include <ctime>
#include <queue>
#include <cstdio>
#include <bitset>
#include <cctype>
#include <bitset>
#include <cstdlib>
#include <cassert>
#include <cstring>
#include <iostream>
#include <algorithm>
#define inf (1<<30)
#define INF (1ll<<62)
#define fi first
#define se second
#define rep(x,s,t) for(register int x=s,t_=t;x<t_;++x)
#define per(x,s,t) for(register int x=t-1,s_=s;x>=s_;--x)
#define travel(x) for(int I=last[x],to;I&&(to=e[I].to);I=e[I].nxt)
#define prt(x) cout<<#x<<":"<<x<<" "
#define prtn(x) cout<<#x<<":"<<x<<endl
#define pb(x) push_back(x)
#define hash asfmaljkg
#define rank asfjhgskjf
#define y1 asggnja
#define y2 slfvm
using namespace std;
typedef long long ll;
typedef pair<int,int> ii;
template<class T>void sc(T &x){
int f=1;char c;x=0;
while(c=getchar(),c<48)if(c=='-')f=-1;
do x=x*10+(c^48);
while(c=getchar(),c>47);
x*=f;
}
template<class T>void nt(T x){
if(!x)return;
nt(x/10);
putchar(x%10+'0');
}
template<class T>void pt(T x){
if(x<0)putchar('-'),x=-x;
if(!x)putchar('0');
else nt(x);
}
template<class T>void ptn(T x){
pt(x);putchar('\n');
}
template<class T>void pts(T x){
pt(x);putchar(' ');
}
template<class T>inline void Max(T &x,T y){if(x<y)x=y;}
template<class T>inline void Min(T &x,T y){if(x>y)x=y;}
const int maxn=205;
const int mod=1e9+7;
template<class T>inline void mop(T &x,T y){if((x+=y)>=mod)x-=mod;}
int n;
ll a[maxn][maxn];
int det(ll a[maxn][maxn],int n){
bool f=0;
rep(i,0,n){
rep(j,i+1,n){
int x=i,y=j;
while(a[y][i]){
int d=a[x][i]/a[y][i];
if(d)rep(k,i,n)a[x][k]=(a[x][k]-a[y][k]*d)%mod;
swap(x,y);
}
if(x!=i){
rep(k,i,n)swap(a[x][k],a[i][k]);
f^=1;
}
}
if(!a[i][i])return 0;
}
ll ans=f?-1:1;
rep(i,0,n)ans=ans*a[i][i]%mod;
if(ans<0)ans+=mod;
return ans;
}
int main(){
// freopen("pro.in","r",stdin);
// freopen("chk.out","w",stdout);
sc(n);
rep(i,0,n)rep(j,0,n)sc(a[i][j]);
ptn(det(a,n));
return 0;
}