結果

問題 No.3180 angles sum
コンテスト
ユーザー LyricalMaestro
提出日時 2025-06-17 00:17:23
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 364 ms / 2,000 ms
+ 795µs
コード長 767 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 256 ms
コンパイル使用メモリ 95,980 KB
実行使用メモリ 98,336 KB
最終ジャッジ日時 2026-07-12 06:52:48
合計ジャッジ時間 8,403 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

## 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()
0