結果

問題 No.1366 交換門松列・梅
ユーザー brthyyjpbrthyyjp
提出日時 2021-01-30 16:56:19
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 91 ms / 1,000 ms
コード長 434 bytes
コンパイル時間 341 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 71,704 KB
最終ジャッジ日時 2023-07-30 09:02:25
合計ジャッジ時間 2,431 ms
ジャッジサーバーID
(参考情報)
judge11 / judge5
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
71,616 KB
testcase_01 AC 89 ms
71,616 KB
testcase_02 AC 91 ms
71,620 KB
testcase_03 AC 85 ms
71,480 KB
testcase_04 AC 86 ms
71,616 KB
testcase_05 AC 86 ms
71,700 KB
testcase_06 AC 91 ms
71,608 KB
testcase_07 AC 88 ms
71,448 KB
testcase_08 AC 88 ms
71,704 KB
testcase_09 AC 89 ms
71,640 KB
testcase_10 AC 87 ms
71,456 KB
testcase_11 AC 89 ms
71,632 KB
testcase_12 AC 87 ms
71,588 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

def check(X):
    if len(X) == len(set(X)) and (X[1] == max(X) or X[1] == min(X)):
        return True
    else:
        return False

import copy
for i in range(3):
    for j in range(3):
        X = copy.copy(A)
        Y = copy.copy(B)
        X[i], Y[j] = Y[j], X[i]
        if check(X) and check(Y):
            print('Yes')
            exit()
print('No')
0