cp-library

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

View the Project on GitHub qandori/cp-library

:heavy_check_mark: test/matrix_pow.test.cpp

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

検証問題

依存ライブラリ

コード

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

int main() {
	FastInput in;
	FastOutput out;
	int n = 0;
	std::uint64_t k = 0;
	in.read(n); in.read(k);
	write_matrix(out, read_matrix(in, n, n).pow(k));
}
Back to top page