結果

問題 No.930 数列圧縮
ユーザー chocoruskchocorusk
提出日時 2019-03-30 03:28:36
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 774 bytes
コンパイル時間 995 ms
コンパイル使用メモリ 97,104 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-24 22:07:47
合計ジャッジ時間 4,591 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 WA -
testcase_07 AC 3 ms
5,376 KB
testcase_08 AC 28 ms
5,376 KB
testcase_09 AC 32 ms
5,376 KB
testcase_10 AC 26 ms
5,376 KB
testcase_11 AC 27 ms
5,376 KB
testcase_12 AC 33 ms
5,376 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 39 ms
5,376 KB
testcase_16 AC 38 ms
5,376 KB
testcase_17 AC 39 ms
5,376 KB
testcase_18 AC 38 ms
5,376 KB
testcase_19 AC 39 ms
5,376 KB
testcase_20 AC 39 ms
5,376 KB
testcase_21 AC 39 ms
5,376 KB
testcase_22 AC 2 ms
5,376 KB
testcase_23 AC 39 ms
5,376 KB
testcase_24 AC 2 ms
5,376 KB
testcase_25 WA -
testcase_26 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <time.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;

int main()
{
	int n; cin>>n;
	int a[100003];
	for(int i=0; i<n; i++){
		cin>>a[i];
	}
	if(a[0]>a[n-1]){
		cout<<"No"<<endl;
		cout<<"jinsei"<<endl;
	}else{
		cout<<"Yes"<<endl;
		for(int i=1; i<n-1; i++){
			if(a[0]<a[i]) cout<<a[i]<<" ";
		}
		for(int i=n-2; i>0; i--){
			if(a[0]>a[i]) cout<<a[i]<<" ";
		}
		cout<<a[0]<<endl;
	}
	return 0;
}
0