結果

問題 No.1366 交換門松列・梅
ユーザー ygd.ygd.
提出日時 2021-01-29 21:24:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 51 ms / 1,000 ms
コード長 508 bytes
コンパイル時間 232 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 53,888 KB
最終ジャッジ日時 2024-04-17 10:19:29
合計ジャッジ時間 1,706 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

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

def check(X):
    if X[0] == X[1] or X[1] == X[2] or X[2] == X[0]:
        return False
    if X[0] < X[1] and X[1] > X[2]:
        return True
    if X[0] > X[1] and X[1] < X[2]:
        return True
    return False

for i in range(3):
    for j in range(3):
        AA = copy.copy(A)
        BB = copy.copy(B)
        AA[i],BB[j] = BB[j],AA[i]
        if check(AA) and check(BB):
            print("Yes");exit()
print("No")
0