結果

問題 No.365 ジェンガソート
ユーザー dnish
提出日時 2017-05-03 06:44:00
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 355 bytes
コンパイル時間 1,697 ms
コンパイル使用メモリ 169,464 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-14 05:11:20
合計ジャッジ時間 3,566 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define REP(i,n,N) for(int i=(n);i<(int)N;i++)
#define p(s) cout<<(s)<<endl
using namespace std;
const int inf=1e9;

int main(){
	int N;
	cin>>N;
	int a[100010];
	REP(i,0,N) cin>>a[i];
	vector<int> vt(N,inf);
	REP(i,0,N)	*lower_bound(vt.begin(),vt.end(),a[i])=a[i];
	p(vt.end()-lower_bound(vt.begin(),vt.end(),inf));
	return 0;
}
0