We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem name: GCD of Gaussian Integers Problem ID: gcd_of_gaussian_integers
$t=0, \ldots ,Q-1$ について、ガウス整数 $a _ t + b _ t i$ , $c _ t + d _ t i$ の最大公約数 $x _ t + y _ t i$ を求めてください。
$Q$ $a _ 0$ $b _ 0$ $c _ 0$ $d _ 0$ $a _ 1$ $b _ 1$ $c _ 1$ $d _ 1$ $\vdots$ $a _ {Q-1}$ $b _ {Q-1}$ $c _ {Q-1}$ $d _ {Q-1}$
$x _ 0$ $y _ 0$ $x _ 1$ $y _ 1$ $\vdots$ $x _ {Q-1}$ $y _ {Q-1}$
originally posted by hec12 : #3 (comment)
The text was updated successfully, but these errors were encountered:
$\gcd (0, x) = x$ や $\gcd(0, 0) = 0$ も入れて良いのではと思います。
単数倍についてはどうすると良いでしょうか。入力は正規化されていないとして、出力を正規化させるか、なんでも OK にするか。
Sorry, something went wrong.
単数倍はまず #895 で議論して、その後に $0$ のことを決めるのがよさそうです。
$0$ は入れてよいと思います。 $4$ 通りのうちいずれかを出力でよいと思います。 $|a_i|\leq 10^9$ という感じの制約がつくのだと思っています。
出力は単数倍の自由度を認める(ジャッジを実装する)ということでお願いします。
作業します。
maspypy
No branches or pull requests
Problem name: GCD of Gaussian Integers
Problem ID: gcd_of_gaussian_integers
Problem
Constraint
Input
Output
Note
originally posted by hec12 : #3 (comment)
The text was updated successfully, but these errors were encountered: