結果

問題 No.1366 交換門松列・梅
ユーザー TakoKurageTakoKurage
提出日時 2021-02-20 00:28:51
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 366 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 11,832 KB
実行使用メモリ 10,116 KB
最終ジャッジ日時 2023-10-17 03:37:16
合計ジャッジ時間 2,393 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

def is_kadomatsu(A):
    return len(set(A)) == 3 and (max(A) == A[1] or min(A) == A[1])

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

for i in range(3):
    for j in range(3):
        A[i], B[i] = B[i], A[i]

        if is_kadomatsu(A) and is_kadomatsu(B):
            print("Yes")
            quit()

        A[i], B[i] = B[i], A[i]

print("No")
0