結果

問題 No.1366 交換門松列・梅
ユーザー maimai
提出日時 2023-04-03 02:31:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 453 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 11,812 KB
実行使用メモリ 10,112 KB
最終ジャッジ日時 2023-10-25 05:18:02
合計ジャッジ時間 1,629 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

a = list(map(int,input().split()))
b = list(map(int,input().split()))

if (a[0]<a[1]<a[2] and b[0]<b[1]<b[2]) or (a[0]>a[1]>a[2] and b[0]>b[1]>b[2]):
    print("Yes")
else:
    for i in range(3):
        for j in range(3):
            a[i], b[j] = b[j], a[i]
            if (a[0]<a[1]<a[2] and b[0]<b[1]<b[2]) or (a[0]>a[1]>a[2] and b[0]>b[1]>b[2]):
                print("Yes")
                exit()
            a[i], b[j] = b[j], a[i]
    print("No")
0