結果

問題 No.1282 Display Elements
ユーザー tailstails
提出日時 2020-11-06 22:22:54
言語 cLay
(20240104-1)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 187 bytes
コンパイル時間 7,844 ms
コンパイル使用メモリ 216,884 KB
実行使用メモリ 12,916 KB
最終ジャッジ日時 2023-09-19 01:48:09
合計ジャッジ時間 9,151 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,696 KB
testcase_01 AC 3 ms
7,688 KB
testcase_02 AC 2 ms
7,676 KB
testcase_03 AC 3 ms
7,656 KB
testcase_04 AC 2 ms
7,652 KB
testcase_05 AC 3 ms
7,700 KB
testcase_06 AC 3 ms
7,648 KB
testcase_07 AC 3 ms
7,752 KB
testcase_08 AC 3 ms
7,652 KB
testcase_09 AC 3 ms
7,740 KB
testcase_10 AC 3 ms
7,656 KB
testcase_11 AC 3 ms
7,876 KB
testcase_12 AC 3 ms
7,648 KB
testcase_13 AC 3 ms
7,644 KB
testcase_14 AC 3 ms
7,632 KB
testcase_15 AC 27 ms
12,856 KB
testcase_16 AC 12 ms
10,072 KB
testcase_17 AC 21 ms
12,712 KB
testcase_18 AC 14 ms
10,388 KB
testcase_19 AC 13 ms
10,856 KB
testcase_20 AC 14 ms
10,944 KB
testcase_21 AC 27 ms
12,916 KB
testcase_22 AC 17 ms
11,080 KB
testcase_23 AC 28 ms
12,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

int a[1d5],b[1d5];
{
	fenwick<int> f;
	f.walloc(2d5,1);
	ll@n;
	rd(a(n),b(n));
	coordcomp(n,a,n,b);
	sort(a,a+n);
	ll z=0;
	rep(i,n){
		f.add(b[i]+1,1);
		z+=f.get(a[i]);
	}
	wt(z);
}

	
0