結果

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

ソースコード

diff #

def iskadomatu(a):
    if len(set(a))<3:
        return False
    elif a[0]<a[1] and a[1]>a[2]:
        return True
    elif a[0]>a[1] and a[1]<a[2]:
        return True
    else:
        return False
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]
for i in range(3):
    for j in range(3):
        a[i],b[j]=b[j],a[i]
        if iskadomatu(a) and iskadomatu(b):
            print("Yes")
            exit()
        a[i],b[j]=b[j],a[i]
print("No")
0