cp-library

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

View the Project on GitHub qandori/cp-library

:heavy_check_mark: test/fps_exp_sparse.test.cpp

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

検証問題

依存ライブラリ

コード

#define PROBLEM "https://judge.yosupo.jp/problem/exp_of_formal_power_series_sparse"
#include "fixtures/fps_bulk_io.hpp"

int main() {
	FastInput input;
	FastOutput output;
	int n = 0, k = 0;
	input.read(n); input.read(k);
	fps a(n);
	for (int i = 0; i < k; ++i) {
		int degree = 0;
		unsigned value = 0;
		input.read(degree); input.read(value);
		a[degree] = fps_mint::raw(value);
	}
	write_fps(output, a.exp());
}
Back to top page