結果

問題 No.1366 交換門松列・梅
ユーザー 310icecrystal310icecrystal
提出日時 2023-07-05 06:23:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 1,000 ms
コード長 325 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 87,048 KB
実行使用メモリ 71,556 KB
最終ジャッジ日時 2023-09-26 05:26:48
合計ジャッジ時間 2,165 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,404 KB
testcase_01 AC 70 ms
71,424 KB
testcase_02 AC 70 ms
71,440 KB
testcase_03 AC 74 ms
71,356 KB
testcase_04 AC 70 ms
71,544 KB
testcase_05 AC 69 ms
71,360 KB
testcase_06 AC 71 ms
71,216 KB
testcase_07 AC 67 ms
71,328 KB
testcase_08 AC 69 ms
71,236 KB
testcase_09 AC 69 ms
71,300 KB
testcase_10 AC 76 ms
71,240 KB
testcase_11 AC 70 ms
71,264 KB
testcase_12 AC 71 ms
71,556 KB
権限があれば一括ダウンロードができます

ソースコード

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