結果

問題 No.1366 交換門松列・梅
ユーザー 310icecrystal310icecrystal
提出日時 2023-07-05 06:23:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 37 ms / 1,000 ms
コード長 325 bytes
コンパイル時間 445 ms
コンパイル使用メモリ 82,244 KB
実行使用メモリ 53,584 KB
最終ジャッジ日時 2024-12-16 13:21:50
合計ジャッジ時間 1,347 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

a = list(map(int,input().split()))
b = list(map(int,input().split()))

def is_kado(li):
	if len(set(li)) == 3 and li[1] in {max(li),min(li)}:
		return True
	else:
		return False

for i in range(3):
	for j in range(3):
		if is_kado(a[:i]+[b[j]]+a[i+1:]) and is_kado(b[:j]+[a[i]]+b[j+1:]):
			print("Yes")
			exit()
print("No")
0