結果

問題 No.1366 交換門松列・梅
ユーザー lloyzlloyz
提出日時 2022-01-20 20:53:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 34 ms / 1,000 ms
コード長 558 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-17 10:37:59
合計ジャッジ時間 1,567 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,880 KB
testcase_01 AC 30 ms
10,752 KB
testcase_02 AC 30 ms
10,752 KB
testcase_03 AC 30 ms
10,752 KB
testcase_04 AC 30 ms
10,880 KB
testcase_05 AC 34 ms
10,752 KB
testcase_06 AC 30 ms
10,752 KB
testcase_07 AC 30 ms
10,880 KB
testcase_08 AC 30 ms
10,752 KB
testcase_09 AC 31 ms
10,752 KB
testcase_10 AC 29 ms
10,880 KB
testcase_11 AC 32 ms
10,752 KB
testcase_12 AC 30 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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