結果

問題 No.647 明太子
ユーザー tailstails
提出日時 2023-03-03 19:13:39
言語 cLay
(20240104-1)
結果
AC  
実行時間 4 ms / 4,500 ms
コード長 444 bytes
コンパイル時間 7,354 ms
コンパイル使用メモリ 220,608 KB
実行使用メモリ 8,392 KB
最終ジャッジ日時 2023-10-18 01:13:05
合計ジャッジ時間 8,939 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
8,216 KB
testcase_01 AC 3 ms
8,216 KB
testcase_02 AC 3 ms
8,216 KB
testcase_03 AC 4 ms
8,216 KB
testcase_04 AC 3 ms
8,216 KB
testcase_05 AC 3 ms
8,216 KB
testcase_06 AC 3 ms
8,216 KB
testcase_07 AC 2 ms
8,216 KB
testcase_08 AC 3 ms
8,216 KB
testcase_09 AC 3 ms
8,216 KB
testcase_10 AC 3 ms
8,216 KB
testcase_11 AC 3 ms
8,216 KB
testcase_12 AC 2 ms
8,216 KB
testcase_13 AC 3 ms
8,216 KB
testcase_14 AC 4 ms
8,332 KB
testcase_15 AC 3 ms
8,216 KB
testcase_16 AC 3 ms
8,216 KB
testcase_17 AC 4 ms
8,344 KB
testcase_18 AC 3 ms
8,340 KB
testcase_19 AC 3 ms
8,260 KB
testcase_20 AC 3 ms
8,244 KB
testcase_21 AC 3 ms
8,216 KB
testcase_22 AC 4 ms
8,392 KB
testcase_23 AC 3 ms
8,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

int a[2d4],b[];
int@n;
rd((a,b)(n));
int@m;
rd(((a+n),(b+n))(m));
coordcomp(n+m,b);
ull c[2d4];
rep(i,n+m){
	c[i]=(ll)~a[i]<<32|b[i]<<16|(i<n?0:i-n+1);
}
sortA(n+m,c);
int g=1;
int h[1d3];
fenwick<int>f;
f.malloc(1<<14,1);
rep[c](d,n+m){
	int y=(unsigned)d>>16;
	int z=d&(1<<16)-1;
	if(z){
		int e=f.get(y);
		h[z-1]=e;
		if(g<e){
			g=e;
		}
	}else{
		f.add(y,1);
	}
}
int k=0;
rep(i,m){
	if(h[i]==g){
		wt(i+1);
		k=1;
	}
}
if(!k){
	wt(0);
}
0