結果
問題 |
No.3225 2×2行列相似判定 〜easy〜
|
ユーザー |
|
提出日時 | 2025-08-11 04:41:39 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 549 bytes |
コンパイル時間 | 362 ms |
コンパイル使用メモリ | 82,248 KB |
実行使用メモリ | 67,524 KB |
最終ジャッジ日時 | 2025-08-11 04:41:43 |
合計ジャッジ時間 | 4,262 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 33 |
ソースコード
import numpy as np p = 67 A = np.array([list(map(int, input().split())), list(map(int, input().split()))]) B = np.array([list(map(int, input().split())), list(map(int, input().split()))]) for w in range(p) : for x in range(p) : for y in range(p) : for z in range(p) : if (w * z - x * y) % p == 0 : continue P = np.array([[w, x], [y, z]]) PA = P @ A BP = B @ P ok = True for i in range(2) : for j in range(2) : ok = ok and (PA[i, j] % p == BP[i, j]) if ok : print("Yes") exit() print("No")