結果

問題 No.930 数列圧縮
ユーザー chocorusk
提出日時 2019-03-30 06:19:53
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 181 ms / 2,000 ms
コード長 305 bytes
コンパイル時間 246 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 20,648 KB
最終ジャッジ日時 2024-11-07 17:05:00
合計ジャッジ時間 4,798 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int, input().split()))
if a[0]>a[n-1]:
    print("No")
else:
    print("Yes")
    for i in range(1, n-1):
        if a[0]<a[i]:
            print("%d " % a[i], end="")
    for i in range(n-2, 0, -1):
        if a[0]>a[i]:
            print("%d " % a[i], end="")
    print(a[n-1])
0