結果

問題 No.1366 交換門松列・梅
ユーザー 👑 H20H20
提出日時 2021-01-29 21:34:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 50 ms / 1,000 ms
コード長 518 bytes
コンパイル時間 204 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 54,144 KB
最終ジャッジ日時 2024-04-17 10:28:19
合計ジャッジ時間 1,424 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
53,376 KB
testcase_01 AC 50 ms
54,016 KB
testcase_02 AC 44 ms
53,376 KB
testcase_03 AC 45 ms
53,888 KB
testcase_04 AC 45 ms
53,888 KB
testcase_05 AC 45 ms
53,632 KB
testcase_06 AC 44 ms
53,760 KB
testcase_07 AC 45 ms
53,632 KB
testcase_08 AC 50 ms
54,144 KB
testcase_09 AC 45 ms
53,376 KB
testcase_10 AC 45 ms
53,632 KB
testcase_11 AC 47 ms
53,376 KB
testcase_12 AC 47 ms
53,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections

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

for i in range(3):
    for j in range(3,6):
        AB = A+B
        AB[i],AB[j]=AB[j],AB[i]
        TEMPA=AB[0:3]
        TEMPB=AB[3:6]
        if max(TEMPA)==TEMPA[1] or min(TEMPA)==TEMPA[1]:
            if max(TEMPB)==TEMPB[1] or min(TEMPB)==TEMPB[1]:
                if len(list(collections.Counter(TEMPA)))+len(list(collections.Counter(TEMPB)))==6:
                    print('Yes')
                    exit()
print('No')
0