結果

問題 No.2374 ASKT Subsequences
ユーザー tailstails
提出日時 2023-07-07 22:55:54
言語 cLay
(20240104-1)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 255 bytes
コンパイル時間 3,676 ms
コンパイル使用メモリ 160,936 KB
実行使用メモリ 66,536 KB
最終ジャッジ日時 2023-09-29 00:32:22
合計ジャッジ時間 4,208 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
66,256 KB
testcase_01 AC 20 ms
66,328 KB
testcase_02 AC 19 ms
66,248 KB
testcase_03 AC 18 ms
66,256 KB
testcase_04 AC 18 ms
66,324 KB
testcase_05 AC 18 ms
66,260 KB
testcase_06 AC 19 ms
66,228 KB
testcase_07 AC 19 ms
66,228 KB
testcase_08 AC 18 ms
66,520 KB
testcase_09 AC 19 ms
66,300 KB
testcase_10 AC 20 ms
66,232 KB
testcase_11 AC 19 ms
66,520 KB
testcase_12 AC 20 ms
66,296 KB
testcase_13 AC 19 ms
66,300 KB
testcase_14 AC 23 ms
66,328 KB
testcase_15 AC 20 ms
66,232 KB
testcase_16 AC 20 ms
66,256 KB
testcase_17 AC 21 ms
66,528 KB
testcase_18 AC 23 ms
66,312 KB
testcase_19 AC 24 ms
66,312 KB
testcase_20 AC 30 ms
66,268 KB
testcase_21 AC 32 ms
66,320 KB
testcase_22 AC 28 ms
66,536 KB
testcase_23 AC 25 ms
66,244 KB
testcase_24 AC 24 ms
66,260 KB
testcase_25 AC 23 ms
66,340 KB
testcase_26 AC 39 ms
66,288 KB
testcase_27 AC 28 ms
66,416 KB
testcase_28 AC 29 ms
66,384 KB
testcase_29 AC 26 ms
66,292 KB
testcase_30 AC 28 ms
66,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,@a[n],z=0,d[2001][2012]{},e[][]{};
rep(i,n){
	d[i+1][0..2011]=d[i][0..];
	d[i+1][a[i]+10]+=1;
}
rrep(i,n){
	e[i][0..2011]=e[i+1][0..];
	e[i][a[i]]+=1;
}
rep(x,1,n-2){
	rep(y,x+1,n-1){
		if(a[x]>a[y]){
			z+=d[x][a[y]]*e[y+1][a[x]+1];
		}
	}
}
wt(z);
0