結果

問題 No.759 悪くない忘年会にしような!
ユーザー tailstails
提出日時 2018-12-07 00:54:00
言語 cLay
(20231016-1)
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 450 bytes
コンパイル時間 3,689 ms
コンパイル使用メモリ 182,328 KB
実行使用メモリ 8,992 KB
最終ジャッジ日時 2023-09-19 00:11:02
合計ジャッジ時間 7,166 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,976 KB
testcase_01 AC 2 ms
5,968 KB
testcase_02 AC 3 ms
5,952 KB
testcase_03 AC 2 ms
5,972 KB
testcase_04 AC 2 ms
5,912 KB
testcase_05 AC 3 ms
5,968 KB
testcase_06 AC 3 ms
6,032 KB
testcase_07 AC 3 ms
5,952 KB
testcase_08 AC 3 ms
6,012 KB
testcase_09 AC 2 ms
5,900 KB
testcase_10 AC 2 ms
5,964 KB
testcase_11 AC 2 ms
5,912 KB
testcase_12 AC 3 ms
5,900 KB
testcase_13 AC 2 ms
5,956 KB
testcase_14 AC 2 ms
5,968 KB
testcase_15 AC 2 ms
5,956 KB
testcase_16 AC 3 ms
5,904 KB
testcase_17 AC 2 ms
5,952 KB
testcase_18 AC 3 ms
5,912 KB
testcase_19 AC 2 ms
6,100 KB
testcase_20 AC 2 ms
5,904 KB
testcase_21 AC 2 ms
5,964 KB
testcase_22 AC 2 ms
5,972 KB
testcase_23 AC 2 ms
6,168 KB
testcase_24 AC 3 ms
5,908 KB
testcase_25 AC 3 ms
5,900 KB
testcase_26 AC 2 ms
5,956 KB
testcase_27 AC 2 ms
5,912 KB
testcase_28 AC 2 ms
6,108 KB
testcase_29 AC 2 ms
5,896 KB
testcase_30 AC 3 ms
5,908 KB
testcase_31 AC 2 ms
6,032 KB
testcase_32 AC 2 ms
5,964 KB
testcase_33 AC 5 ms
6,184 KB
testcase_34 AC 3 ms
6,020 KB
testcase_35 AC 3 ms
6,120 KB
testcase_36 AC 5 ms
6,444 KB
testcase_37 AC 3 ms
6,036 KB
testcase_38 AC 5 ms
6,224 KB
testcase_39 AC 3 ms
5,976 KB
testcase_40 AC 4 ms
6,116 KB
testcase_41 AC 5 ms
6,152 KB
testcase_42 AC 5 ms
6,340 KB
testcase_43 AC 6 ms
6,240 KB
testcase_44 AC 40 ms
8,768 KB
testcase_45 AC 40 ms
8,728 KB
testcase_46 AC 41 ms
8,680 KB
testcase_47 AC 41 ms
8,956 KB
testcase_48 AC 41 ms
8,708 KB
testcase_49 AC 5 ms
6,248 KB
testcase_50 AC 5 ms
6,296 KB
testcase_51 AC 5 ms
6,252 KB
testcase_52 AC 5 ms
6,244 KB
testcase_53 AC 42 ms
8,672 KB
testcase_54 AC 42 ms
8,704 KB
testcase_55 AC 41 ms
8,804 KB
testcase_56 AC 41 ms
8,752 KB
testcase_57 AC 40 ms
8,760 KB
testcase_58 AC 41 ms
8,816 KB
testcase_59 AC 41 ms
8,732 KB
testcase_60 AC 41 ms
8,736 KB
testcase_61 AC 41 ms
8,724 KB
testcase_62 AC 40 ms
8,708 KB
testcase_63 AC 62 ms
8,936 KB
testcase_64 AC 63 ms
8,984 KB
testcase_65 AC 41 ms
8,540 KB
testcase_66 AC 61 ms
8,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

int n;
int ap[101010],at[101010],ar[101010],ai[101010],alive[101010];

bool cmp(int a,int b){
	return
	ap[a]>ap[b]?:ap[a]<ap[b]?0:
	at[a]>at[b]?:at[a]<at[b]?0:
	ar[a]>ar[b];
}

{
	rd(n,(ap,at,ar)(n));
	ai[0..n]=(0..);
	std::sort(ai,ai+n,cmp);
	segtree<int> t;
	t.malloc(1d4+1,1);
	for(int j=0;j<n;++j){
		int i=ai[j];
		if(t.getMinVal(at[i],1d4+1)+1>-ar[i]){
			alive[i]=1;
			t.change(at[i],at[i]+1,-ar[i]-1);
		}
	}
	rep(i,n)if(alive[i])wt(i+1);
}
0