結果

問題 No.694 square1001 and Permutation 3
ユーザー tailstails
提出日時 2018-06-15 19:00:20
言語 cLay
(20231016-1)
結果
AC  
実行時間 94 ms / 3,000 ms
コード長 177 bytes
コンパイル時間 5,318 ms
コンパイル使用メモリ 217,840 KB
実行使用メモリ 26,180 KB
最終ジャッジ日時 2023-09-19 00:04:31
合計ジャッジ時間 10,268 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,552 KB
testcase_01 AC 2 ms
7,496 KB
testcase_02 AC 2 ms
7,504 KB
testcase_03 AC 3 ms
7,556 KB
testcase_04 AC 2 ms
7,776 KB
testcase_05 AC 2 ms
7,492 KB
testcase_06 AC 2 ms
7,500 KB
testcase_07 AC 57 ms
23,968 KB
testcase_08 AC 80 ms
24,144 KB
testcase_09 AC 94 ms
26,132 KB
testcase_10 AC 46 ms
17,828 KB
testcase_11 AC 93 ms
26,052 KB
testcase_12 AC 92 ms
26,180 KB
testcase_13 AC 3 ms
7,488 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll r,n,a[6d5];
fenwick<int>t;
{
	rd(n,a(n));
	coordcomp(n,a);
	t.walloc(n);
	t.init(n);
	rep(i,n)r+=i-t.get(a[i]),t.add(a[i],1);
	rep(i,n)wt(r),r+=n-t.get(a[i])-t.get(a[i]-1);
}
0