結果

問題 No.2374 ASKT Subsequences
ユーザー tailstails
提出日時 2023-07-07 22:59:09
言語 cLay
(20240104-1)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 207 bytes
コンパイル時間 2,100 ms
コンパイル使用メモリ 160,640 KB
実行使用メモリ 35,072 KB
最終ジャッジ日時 2023-09-29 00:35:46
合計ジャッジ時間 3,790 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
34,808 KB
testcase_01 AC 10 ms
34,956 KB
testcase_02 AC 11 ms
34,892 KB
testcase_03 AC 10 ms
34,792 KB
testcase_04 AC 10 ms
35,004 KB
testcase_05 AC 11 ms
34,876 KB
testcase_06 AC 10 ms
34,860 KB
testcase_07 AC 10 ms
34,820 KB
testcase_08 AC 10 ms
34,792 KB
testcase_09 AC 11 ms
34,828 KB
testcase_10 AC 10 ms
35,000 KB
testcase_11 AC 11 ms
34,960 KB
testcase_12 AC 11 ms
35,064 KB
testcase_13 AC 10 ms
34,860 KB
testcase_14 AC 10 ms
34,872 KB
testcase_15 AC 11 ms
34,864 KB
testcase_16 AC 11 ms
34,812 KB
testcase_17 AC 11 ms
34,960 KB
testcase_18 AC 13 ms
34,808 KB
testcase_19 AC 14 ms
35,072 KB
testcase_20 AC 18 ms
34,816 KB
testcase_21 AC 19 ms
34,824 KB
testcase_22 AC 16 ms
34,824 KB
testcase_23 AC 13 ms
34,888 KB
testcase_24 AC 14 ms
34,820 KB
testcase_25 AC 12 ms
34,832 KB
testcase_26 AC 25 ms
34,832 KB
testcase_27 AC 15 ms
34,840 KB
testcase_28 AC 17 ms
34,828 KB
testcase_29 AC 15 ms
34,824 KB
testcase_30 AC 16 ms
34,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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