結果

問題 No.1366 交換門松列・梅
ユーザー umaruuuunumaruuuun
提出日時 2021-01-29 22:09:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 572 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 10,800 KB
実行使用メモリ 8,548 KB
最終ジャッジ日時 2023-09-09 15:33:15
合計ジャッジ時間 1,175 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,464 KB
testcase_01 AC 17 ms
8,456 KB
testcase_02 AC 17 ms
8,428 KB
testcase_03 WA -
testcase_04 AC 18 ms
8,408 KB
testcase_05 WA -
testcase_06 AC 18 ms
8,396 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 17 ms
8,460 KB
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import copy
a=list(map(int,input().split()))
b=list(map(int,input().split()))
if len(set(a))!=len(a) or len(set(b))!=len(b):
    print("No")
else:
    ans="No"
    for i in range(3):
        for j in range(3):
            t=copy.copy(a)
            s=copy.copy(b)
            t[i],s[j]=s[j],t[i]
            if ((max(t)==t[1] and t.count(t[1])==1)  or (min(t)==t[1] and t.count(t[1])==1)) and ((max(s)==s[1] and s.count(s[1])==1) or (min(s)==s[1] and s.count(s[1])==1)):
                ans="Yes"
            else:
                continue
            break
    print(ans)
0