cp-library

競技プログラミング用 C++ ライブラリ

View the Project on GitHub qandori/cp-library

:heavy_check_mark: test/matrix_inverse.test.cpp

test/matrix_inverse.test.cpp · GitHub で見る

検証問題

依存ライブラリ

コード

#define PROBLEM "https://judge.yosupo.jp/problem/inverse_matrix"
#include "fixtures/matrix_common.hpp"

int main() {
	FastInput in;
	FastOutput out;
	int n = 0;
	in.read(n);
	auto inverse = read_matrix(in, n, n).inverse();
	if (inverse) write_matrix(out, *inverse);
	else out.println(-1);
}
Back to top page