結果

問題 No.1366 交換門松列・梅
コンテスト
ユーザー matrie
提出日時 2021-02-07 00:04:09
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 22 ms / 1,000 ms
+ 220µs
コード長 283 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 57 ms
コンパイル使用メモリ 15,104 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2026-10-10 23:20:40
合計ジャッジ時間 1,779 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

A=list(map(int,input().split()))
B=list(map(int,input().split()))

def k(L):
	if len(set(L))==3 and sorted(L)[1]!=L[1]: return 1
	else: return 0

a="No"
for i in [0,1,2]:
	for j in [0,1,2]:
		X=[x for x in A]
		Y=[y for y in B]
		X[i],Y[j]=Y[j],X[i]
		if k(X)*k(Y)>0:a="Yes"
print(a)
0