結果

問題 No.2210 equence Squence Seuence
ユーザー keisuke6keisuke6
提出日時 2023-02-10 21:29:19
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 413 bytes
コンパイル時間 1,972 ms
コンパイル使用メモリ 203,832 KB
実行使用メモリ 6,296 KB
最終ジャッジ日時 2023-09-21 22:32:31
合計ジャッジ時間 4,589 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,356 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 23 ms
4,380 KB
testcase_07 AC 60 ms
5,688 KB
testcase_08 WA -
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 74 ms
6,132 KB
testcase_14 AC 75 ms
6,176 KB
testcase_15 AC 74 ms
6,164 KB
testcase_16 AC 74 ms
6,296 KB
testcase_17 WA -
testcase_18 AC 1 ms
4,376 KB
testcase_19 AC 1 ms
4,376 KB
testcase_20 WA -
testcase_21 AC 1 ms
4,376 KB
testcase_22 WA -
testcase_23 AC 57 ms
5,768 KB
testcase_24 AC 43 ms
4,976 KB
testcase_25 AC 51 ms
5,336 KB
testcase_26 AC 67 ms
6,120 KB
testcase_27 AC 19 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int N,K;
  cin>>N>>K;
  
  deque<int> q;
  vector<int> S(N);
  for(int i=0;i<N;i++) cin>>S[i];
  q.push_back(N-1);
  for(int i=N-2;i>=0;i--){
      if(S[i] < S[i+1]) q.push_back(i);
      else q.push_front(i);
  }
  for(int i=0;i<K-1;i++) q.pop_front();
  for(int i=0;i<N;i++)if(i != q.front()) cout<<S[i]<<' ';
  cout<<endl;
}
0