結果

問題 No.360 増加門松列
ユーザー 👑 rin204rin204
提出日時 2022-07-12 13:31:22
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 351 bytes
コンパイル時間 628 ms
コンパイル使用メモリ 86,956 KB
実行使用メモリ 76,240 KB
最終ジャッジ日時 2023-09-05 14:22:41
合計ジャッジ時間 3,904 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
76,020 KB
testcase_01 AC 84 ms
76,160 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 84 ms
75,996 KB
testcase_05 AC 83 ms
75,736 KB
testcase_06 AC 81 ms
75,984 KB
testcase_07 AC 82 ms
76,184 KB
testcase_08 AC 82 ms
75,988 KB
testcase_09 AC 80 ms
76,020 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 80 ms
75,872 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 83 ms
75,860 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 83 ms
76,240 KB
testcase_19 AC 81 ms
75,844 KB
testcase_20 AC 82 ms
75,932 KB
testcase_21 AC 81 ms
75,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools

D = list(map(int, input().split()))
for lst in itertools.permutations(D):
    ok = True
    for i in range(1, 6):
        a = D[i - 1]
        b = D[i]
        c = D[i + 1]
        if a < c < b or b < a < c:
            pass
        else:
            ok = False
            break
    if ok:
        print("YES")
else:
    print("NO")
0