結果
問題 |
No.3180 angles sum
|
ユーザー |
|
提出日時 | 2025-06-17 00:17:23 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 537 ms / 2,000 ms |
コード長 | 767 bytes |
コンパイル時間 | 291 ms |
コンパイル使用メモリ | 82,516 KB |
実行使用メモリ | 91,460 KB |
最終ジャッジ日時 | 2025-06-17 00:17:34 |
合計ジャッジ時間 | 9,992 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 17 |
ソースコード
## https://yukicoder.me/problems/no/3180 def solve(ax, ay, bx, by, cx, cy): left = (cx ** 2, cx ** 2 + cy ** 2) right = (( ax * bx - ay * by) ** 2, (ax ** 2 + ay ** 2) * (bx ** 2 + by ** 2)) if left[0] * right[1] == left[1] * right[0]: if cx >= 0 and (ax * bx - ay * by) >= 0: return "Yes" elif cx < 0 and (ax * bx - ay * by) < 0: return "Yes" else: return "No" else: return "No" def main(): T = int(input()) answers = [] for _ in range(T): ax, ay, bx, by, cx, cy = map(int, input().split()) ans = solve(ax, ay, bx, by, cx, cy) answers.append(ans) for ans in answers: print(ans) if __name__ == "__main__": main()