cp-library

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

View the Project on GitHub qandori/cp-library

:heavy_check_mark: test/run_enumerate.test.cpp

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

検証問題

依存ライブラリ

コード

#define PROBLEM "https://judge.yosupo.jp/problem/runenumerate"
#include "../string/run_enumerate.hpp"
#include "../components/fast_io.hpp"

int main() {
	FastInput in;
	FastOutput out;
	std::string s;
	in.read(s);
	auto runs = run_enumerate(s);
	out.println(runs.size());
	for (auto [period, l, r] : runs) {
		out.write(period);
		out.write(' ');
		out.write(l);
		out.write(' ');
		out.println(r);
	}
}
Back to top page