結果

問題 No.1366 交換門松列・梅
ユーザー Kude
提出日時 2021-01-29 21:26:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 1,000 ms
コード長 420 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 81,912 KB
実行使用メモリ 53,380 KB
最終ジャッジ日時 2025-06-20 10:56:11
合計ジャッジ時間 1,377 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

a = list(map(int, input().split()))
b = list(map(int, input().split()))
def check():
    for c in a, b:
        if len(set(c)) != 3 or not (c[1] < min(c[0], c[2]) or c[1] > max(c[0], c[2])):
            return False
    return True
for i in range(3):
    for j in range(3):
        a[i], b[j] = b[j], a[i]
        if check():
            print('Yes')
            exit()
        a[i], b[j] = b[j], a[i]
print('No')
exit()
0