結果

問題 No.360 増加門松列
コンテスト
ユーザー ntuda
提出日時 2025-02-26 22:25:37
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 345 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 228 ms
コンパイル使用メモリ 95,980 KB
実行使用メモリ 84,012 KB
最終ジャッジ日時 2026-07-06 10:44:50
合計ジャッジ時間 3,131 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from itertools import permutations
D = list(map(int,input().split()))

for X in permutations(range(7),7):
    for i in range(5):
        Y = [D[X[i]],D[X[i+1]],D[X[i+2]]]
        if (max(Y) == Y[1] or min(Y) == Y[1]) and Y[0] < Y[2]:
            continue
        else:
            break
    else:
        print("YES")
        exit()
print("NO")
0