結果
問題 | No.930 数列圧縮 |
ユーザー |
![]() |
提出日時 | 2019-11-22 21:51:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 41 ms / 2,000 ms |
コード長 | 478 bytes |
コンパイル時間 | 1,549 ms |
コンパイル使用メモリ | 169,068 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-11 03:21:09 |
合計ジャッジ時間 | 3,735 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;#define all(x) (x).begin(),(x).end()const int mod=1000000007,MAX=100005,INF=1<<30;int main(){int N;cin>>N;vector<int> A(N);for(int i=0;i<N;i++) cin>>A[i];if(A[0]>A[N-1]){cout<<"No"<<endl;}else{cout<<"Yes"<<endl;for(int i=N;i>A[N-1];i--) cout<<i<<" ";for(int i=N-2;i>=0;i--) if(A[i]<A[N-1]) cout<<A[i]<<" ";cout<<endl;}}