結果

問題 No.2210 equence Squence Seuence
ユーザー achapiachapi
提出日時 2023-02-11 02:22:54
言語 C++17(clang)
(17.0.6 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,209 bytes
コンパイル時間 7,465 ms
コンパイル使用メモリ 149,588 KB
実行使用メモリ 6,744 KB
最終ジャッジ日時 2023-09-22 02:29:33
合計ジャッジ時間 9,815 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 18 ms
4,384 KB
testcase_04 WA -
testcase_05 AC 31 ms
4,696 KB
testcase_06 AC 27 ms
4,380 KB
testcase_07 AC 69 ms
6,156 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 WA -
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 85 ms
6,636 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 85 ms
6,680 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 1 ms
4,380 KB
testcase_20 AC 0 ms
4,380 KB
testcase_21 AC 2 ms
4,380 KB
testcase_22 WA -
testcase_23 AC 66 ms
6,172 KB
testcase_24 AC 50 ms
5,392 KB
testcase_25 AC 59 ms
5,900 KB
testcase_26 AC 79 ms
6,508 KB
testcase_27 AC 23 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
typedef long long ll;
//using mint = modint998244353;
//using mint = modint1000000007;
#define all(...) std::begin(__VA_ARGS__), std::end(__VA_ARGS__)
#define rall(...) std::rbegin(__VA_ARGS__), std::rend(__VA_ARGS__)
#define debug(x) cerr << "\033[33m(line:" << __LINE__ << ") " << #x << ": " << x << "\033[m" << endl;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
using Graph=vector<vector<int>>;
const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }

int main() {
	int n,k;cin>>n>>k;
	vector<int> a(n);
	for(int i=0;i<n;i++)cin>>a[i];
	reverse(all(a));
	deque<int> d={a[0]};
	deque<int> it={0};
	for(int i=1;i<n;i++){
		if(a[i-1]>=a[i]){
			d.push_back(a[i]);
			it.push_back(i);
		}else{
			d.push_front(a[i]);
			it.push_front(i);
		}
	}
	k--;
	vector<int> b;
	reverse(all(a));
	for(int i=0;i<n;i++){
		if((n-it[k]-1)!=i){
			b.push_back(a[i]);
		}
	}
	for(int i=0;i<n-1;i++){
		if(i)cout<<" ";
		cout<<b[i];
	}
	cout<<endl;
}
0