結果

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

ソースコード

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