結果

問題 No.360 増加門松列
ユーザー titiatitia
提出日時 2023-09-21 03:50:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 219 ms
コンパイル使用メモリ 10,556 KB
実行使用メモリ 8,796 KB
最終ジャッジ日時 2023-09-21 03:50:07
合計ジャッジ時間 1,891 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
8,748 KB
testcase_01 AC 24 ms
8,644 KB
testcase_02 AC 19 ms
8,720 KB
testcase_03 AC 18 ms
8,652 KB
testcase_04 AC 23 ms
8,796 KB
testcase_05 AC 22 ms
8,716 KB
testcase_06 AC 23 ms
8,660 KB
testcase_07 AC 22 ms
8,668 KB
testcase_08 AC 23 ms
8,612 KB
testcase_09 AC 23 ms
8,712 KB
testcase_10 AC 19 ms
8,728 KB
testcase_11 AC 18 ms
8,716 KB
testcase_12 AC 24 ms
8,620 KB
testcase_13 AC 19 ms
8,736 KB
testcase_14 AC 19 ms
8,712 KB
testcase_15 AC 21 ms
8,616 KB
testcase_16 AC 18 ms
8,576 KB
testcase_17 AC 19 ms
8,728 KB
testcase_18 AC 23 ms
8,620 KB
testcase_19 AC 24 ms
8,608 KB
testcase_20 AC 24 ms
8,668 KB
testcase_21 AC 23 ms
8,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

from itertools import permutations

P=list(permutations(D))

for L in P:
    flag=1
    for i in range(5):
        a,b,c=L[i:i+3]

        if a!=b and b!=c and a!=c and a<c:
            pass
        else:
            flag=0
            break

    if flag==1:
        print("YES")
        exit()

print("NO")
0