結果

問題 No.1366 交換門松列・梅
ユーザー vwxyz
提出日時 2022-08-08 21:48:17
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 29 ms / 1,000 ms
コード長 397 bytes
コンパイル時間 117 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,496 KB
最終ジャッジ日時 2025-06-20 11:06:49
合計ジャッジ時間 1,175 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline=sys.stdin.readline

def check(lst):
    if len(set(lst))==3 and lst[1] in (min(lst),max(lst)):
        return True
    return False
A=list(map(int,readline().split()))
B=list(map(int,readline().split()))
ans="No"
for i in range(3):
    for j in range(3):
        A[i],B[j]=B[j],A[i]
        if check(A) and check(B):
            ans="Yes"
        A[i],B[j]=B[j],A[i]
print(ans)
0