結果

問題 No.777 再帰的ケーキ
ユーザー tails
提出日時 2018-12-24 01:18:46
言語 cLay
(20241019-1)
結果
AC  
実行時間 223 ms / 2,000 ms
コード長 311 bytes
コンパイル時間 8,309 ms
コンパイル使用メモリ 226,264 KB
実行使用メモリ 27,392 KB
最終ジャッジ日時 2024-07-05 13:17:13
合計ジャッジ時間 11,048 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

ll n,a[2d5],b[2d5],c[2d5],d;
segtree<ll> t;
vector<pair<ll,ll>> v;
{
	rd(n,(a,b,c)(n));
	coordcomp(n,a);
	coordcomp(n,b);
	rep(i,n)b[i]*=-1;
	sortA(n,a,b,c);
	t.malloc(n+1,1);
	rep(i,n){
		d=t.getMinVal(0,1-b[i])-c[i];
		if(t.getMinVal(1-b[i],2-b[i])>d)t.change(1-b[i],2-b[i],d);
	}
	wt(-t.getMinVal(0,n+1));
}
0