結果

問題 No.1366 交換門松列・梅
ユーザー c-yanc-yan
提出日時 2021-01-29 21:32:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 966 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 10,892 KB
実行使用メモリ 7,940 KB
最終ジャッジ日時 2023-08-27 22:06:56
合計ジャッジ時間 1,738 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,828 KB
testcase_01 AC 16 ms
7,852 KB
testcase_02 AC 15 ms
7,940 KB
testcase_03 AC 15 ms
7,828 KB
testcase_04 AC 16 ms
7,904 KB
testcase_05 AC 15 ms
7,776 KB
testcase_06 AC 16 ms
7,880 KB
testcase_07 WA -
testcase_08 AC 16 ms
7,828 KB
testcase_09 AC 16 ms
7,784 KB
testcase_10 AC 16 ms
7,776 KB
testcase_11 AC 16 ms
7,828 KB
testcase_12 AC 16 ms
7,820 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]) == b

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