結果

問題 No.1366 交換門松列・梅
ユーザー c-yanc-yan
提出日時 2021-01-29 21:32:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 961 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 11,024 KB
実行使用メモリ 7,984 KB
最終ジャッジ日時 2023-09-09 14:47:25
合計ジャッジ時間 1,035 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,892 KB
testcase_01 WA -
testcase_02 AC 15 ms
7,848 KB
testcase_03 WA -
testcase_04 AC 15 ms
7,820 KB
testcase_05 AC 15 ms
7,892 KB
testcase_06 AC 15 ms
7,824 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 15 ms
7,828 KB
testcase_11 AC 16 ms
7,792 KB
testcase_12 AC 15 ms
7,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def is_kadomatsu(a, b, c):
    if a == b or b == c or a == c:
        return False
    return min([a, b, c]) == b or max([a, b, c])

a1, a2, a3 = map(int, input().split())
b1, b2, b3 = map(int, input().split())

if is_kadomatsu(b1, a2, a3) and is_kadomatsu(a1, b2, b3):
        print('Yes')
elif is_kadomatsu(b2, a2, a3) and is_kadomatsu(b1, a1, b3):
        print('Yes')
elif is_kadomatsu(b3, a2, a3) and is_kadomatsu(b1, b2, a1):
        print('Yes')
elif is_kadomatsu(a1, b1, a3) and is_kadomatsu(a2, b2, b3):
        print('Yes')
elif is_kadomatsu(a1, b2, a3) and is_kadomatsu(b1, a2, b3):
        print('Yes')
elif is_kadomatsu(a1, b3, a3) and is_kadomatsu(b1, b2, a2):
        print('Yes')
elif is_kadomatsu(a1, a2, b1) and is_kadomatsu(a3, b2, b3):
        print('Yes')
elif is_kadomatsu(a1, a2, b2) and is_kadomatsu(b1, a3, b3):
        print('Yes')
elif is_kadomatsu(a1, a3, b3) and is_kadomatsu(b1, b2, a3):
        print('Yes')
else:
    print('No')
0