結果

問題 No.1366 交換門松列・梅
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-01-29 21:24:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 58 ms / 1,000 ms
コード長 525 bytes
コンパイル時間 1,215 ms
コンパイル使用メモリ 82,352 KB
実行使用メモリ 52,352 KB
最終ジャッジ日時 2024-12-16 13:15:42
合計ジャッジ時間 1,611 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

"""

from sys import stdin
import sys

def kd(L):
    if L[0]==L[1] or L[1]==L[2] or L[2]==L[0]:
        return False
    elif max(L) == L[1] or min(L) == L[1]:
        return True
    else:
        return False

a = list(map(int,stdin.readline().split()))
b = list(map(int,stdin.readline().split()))
ans = "No"

for i in range(3):
    for j in range(3):

        a2 = [a[0],a[1],a[2]]
        b2 = [b[0],b[1],b[2]]

        a2[i],b2[j] = b2[j],a2[i]

        if kd(a2) and kd(b2):
            ans = "Yes"

print (ans)
0