cp-library

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

View the Project on GitHub qandori/cp-library

:heavy_check_mark: test/min_of_mod_of_linear.test.cpp

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

検証問題

依存ライブラリ

コード

#define PROBLEM "https://judge.yosupo.jp/problem/min_of_mod_of_linear"
#include "math/min_of_mod_of_linear.hpp"
#include "components/fast_io.hpp"
#include <cstdint>

int main() {
	FastInput input;
	FastOutput output;
	int t = 0;
	input.read(t);
	while (t--) {
		std::uint32_t n = 0, m = 0, a = 0, b = 0;
		input.read(n), input.read(m), input.read(a), input.read(b);
		output.println(std::uint32_t(min_of_mod_of_linear(n, m, a, b)));
	}
}
Back to top page