結果
問題 | No.930 数列圧縮 |
ユーザー |
![]() |
提出日時 | 2021-04-11 20:51:57 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 294 bytes |
コンパイル時間 | 191 ms |
コンパイル使用メモリ | 82,016 KB |
実行使用メモリ | 97,664 KB |
最終ジャッジ日時 | 2024-06-27 15:14:10 |
合計ジャッジ時間 | 11,910 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | AC * 15 TLE * 2 -- * 7 |
ソースコード
n = int(input())*a, = map(int,input().split())res = []for i in range(1,n):if a[0]==i:res += a[1:]breakelif a[-1]==i:breakelse:a.pop(a.index(i))res.append(i)if len(res) < n-1:print("No")else:print("Yes")print(*res)