結果

問題 No.1366 交換門松列・梅
コンテスト
ユーザー lloyz
提出日時 2022-01-20 20:53:30
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 93 ms / 1,000 ms
+ 752µs
コード長 558 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 289 ms
コンパイル使用メモリ 21,412 KB
実行使用メモリ 15,868 KB
最終ジャッジ日時 2026-07-12 13:01:49
合計ジャッジ時間 2,777 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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

for i in range(3):
    for j in range(3):
        Ac = A[:]
        Bc = B[:]
        Ac[i], Bc[j] = Bc[j], Ac[i]
        if Ac[0] != Ac[1] and Ac[1] != Ac[2] and Ac[2] != Ac[0]:
            if Bc[0] != Bc[1] and Bc[1] != Bc[2] and Bc[2] != Bc[0]:
                if Ac.index(min(Ac)) == 1 or Ac.index(max(Ac)) == 1:
                    if Bc.index(min(Bc)) == 1 or Bc.index(max(Bc)) == 1:
                        print("Yes")
                        exit()
print("No")
0