結果

問題 No.777 再帰的ケーキ
ユーザー tailstails
提出日時 2018-12-24 01:07:16
言語 cLay
(20240104-1)
結果
AC  
実行時間 251 ms / 2,000 ms
コード長 402 bytes
コンパイル時間 7,861 ms
コンパイル使用メモリ 226,852 KB
実行使用メモリ 34,504 KB
最終ジャッジ日時 2023-09-19 00:17:26
合計ジャッジ時間 14,673 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
9,560 KB
testcase_01 AC 2 ms
9,556 KB
testcase_02 AC 3 ms
9,748 KB
testcase_03 AC 2 ms
9,632 KB
testcase_04 AC 3 ms
9,552 KB
testcase_05 AC 3 ms
9,572 KB
testcase_06 AC 3 ms
9,600 KB
testcase_07 AC 3 ms
9,568 KB
testcase_08 AC 3 ms
9,572 KB
testcase_09 AC 3 ms
9,748 KB
testcase_10 AC 3 ms
9,544 KB
testcase_11 AC 3 ms
9,564 KB
testcase_12 AC 3 ms
9,572 KB
testcase_13 AC 3 ms
9,664 KB
testcase_14 AC 3 ms
9,548 KB
testcase_15 AC 3 ms
9,616 KB
testcase_16 AC 3 ms
9,592 KB
testcase_17 AC 3 ms
9,616 KB
testcase_18 AC 3 ms
9,760 KB
testcase_19 AC 3 ms
9,616 KB
testcase_20 AC 2 ms
9,624 KB
testcase_21 AC 4 ms
9,800 KB
testcase_22 AC 4 ms
9,888 KB
testcase_23 AC 3 ms
9,712 KB
testcase_24 AC 3 ms
9,776 KB
testcase_25 AC 5 ms
9,688 KB
testcase_26 AC 4 ms
9,676 KB
testcase_27 AC 4 ms
9,788 KB
testcase_28 AC 251 ms
30,440 KB
testcase_29 AC 239 ms
30,636 KB
testcase_30 AC 244 ms
30,440 KB
testcase_31 AC 241 ms
30,440 KB
testcase_32 AC 154 ms
30,428 KB
testcase_33 AC 125 ms
32,476 KB
testcase_34 AC 169 ms
34,504 KB
testcase_35 AC 206 ms
30,456 KB
testcase_36 AC 156 ms
30,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll n,a[2d5],b[2d5],c[2d5];
segtree<ll> t;
vector<pair<ll,ll>> v;
{
	rd(n,(a,b,c)(n));
	coordcomp(n,a);
	coordcomp(n,b);
	sortA(n,a,b,c);
	t.malloc(n+1,1);
	rep(i,n){
		v.push_back(make_pair(b[i]+1,t.getMinVal(0,b[i]+1)-c[i]));
		if(i==n-1||a[i]!=a[i+1]){
			for(auto& x:v)if(t.getMinVal(x.first,x.first+1)>x.second)t.change(x.first,x.first+1,x.second);
			v.clear();
		}
	}
	wt(-t.getMinVal(0,n+1));
}
0