結果

問題 No.1366 交換門松列・梅
ユーザー brthyyjpbrthyyjp
提出日時 2021-01-30 16:56:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 55 ms / 1,000 ms
コード長 434 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 82,212 KB
実行使用メモリ 53,760 KB
最終ジャッジ日時 2024-04-17 10:32:21
合計ジャッジ時間 1,622 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
53,760 KB
testcase_01 AC 52 ms
52,992 KB
testcase_02 AC 52 ms
53,504 KB
testcase_03 AC 51 ms
53,120 KB
testcase_04 AC 52 ms
53,632 KB
testcase_05 AC 54 ms
53,120 KB
testcase_06 AC 52 ms
53,120 KB
testcase_07 AC 55 ms
53,632 KB
testcase_08 AC 52 ms
53,632 KB
testcase_09 AC 52 ms
53,632 KB
testcase_10 AC 50 ms
53,760 KB
testcase_11 AC 49 ms
52,992 KB
testcase_12 AC 50 ms
53,376 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