結果

問題 No.360 増加門松列
ユーザー roarisroaris
提出日時 2019-08-28 19:34:36
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 354 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 82,428 KB
実行使用メモリ 74,508 KB
最終ジャッジ日時 2024-04-28 20:49:05
合計ジャッジ時間 2,245 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 46 ms
61,164 KB
testcase_03 AC 37 ms
52,332 KB
testcase_04 WA -
testcase_05 AC 61 ms
74,440 KB
testcase_06 WA -
testcase_07 AC 61 ms
74,508 KB
testcase_08 AC 62 ms
74,416 KB
testcase_09 AC 59 ms
74,080 KB
testcase_10 AC 51 ms
65,612 KB
testcase_11 AC 42 ms
57,424 KB
testcase_12 WA -
testcase_13 AC 46 ms
62,232 KB
testcase_14 AC 46 ms
62,096 KB
testcase_15 AC 49 ms
66,852 KB
testcase_16 AC 38 ms
52,504 KB
testcase_17 AC 37 ms
52,488 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 57 ms
71,912 KB
testcase_21 AC 61 ms
74,012 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations

D = list(map(int, input().split()))

for l in permutations(D):
    for i in range(5):
        sub_l = [l[i], l[i+1], l[i+2]]
        
        if l[i+1] in [min(sub_l), max(sub_l)] and l[i] < l[i+2]:
            continue
        else:
            break
    else:
        print('YES')
        break
else:
    print('NO')
0