結果

問題 No.1996 <><
ユーザー tailstails
提出日時 2023-03-14 16:31:46
言語 cLay
(20240104-1)
結果
AC  
実行時間 1,050 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 3,103 ms
コンパイル使用メモリ 178,504 KB
実行使用メモリ 7,688 KB
最終ジャッジ日時 2023-10-18 11:53:16
合計ジャッジ時間 17,942 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,668 KB
testcase_01 AC 2 ms
7,668 KB
testcase_02 AC 2 ms
7,668 KB
testcase_03 AC 2 ms
7,668 KB
testcase_04 AC 2 ms
7,668 KB
testcase_05 AC 2 ms
7,668 KB
testcase_06 AC 2 ms
7,668 KB
testcase_07 AC 3 ms
7,668 KB
testcase_08 AC 2 ms
7,668 KB
testcase_09 AC 2 ms
7,668 KB
testcase_10 AC 2 ms
7,668 KB
testcase_11 AC 783 ms
7,688 KB
testcase_12 AC 899 ms
7,684 KB
testcase_13 AC 865 ms
7,684 KB
testcase_14 AC 720 ms
7,684 KB
testcase_15 AC 742 ms
7,680 KB
testcase_16 AC 797 ms
7,680 KB
testcase_17 AC 654 ms
7,680 KB
testcase_18 AC 678 ms
7,684 KB
testcase_19 AC 893 ms
7,684 KB
testcase_20 AC 1,050 ms
7,688 KB
testcase_21 AC 632 ms
7,680 KB
testcase_22 AC 836 ms
7,684 KB
testcase_23 AC 10 ms
7,668 KB
testcase_24 AC 458 ms
7,684 KB
testcase_25 AC 143 ms
7,680 KB
testcase_26 AC 632 ms
7,684 KB
testcase_27 AC 81 ms
7,676 KB
testcase_28 AC 3 ms
7,668 KB
testcase_29 AC 275 ms
7,680 KB
testcase_30 AC 8 ms
7,668 KB
testcase_31 AC 50 ms
7,676 KB
testcase_32 AC 4 ms
7,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,@k,@a[n];
string@s;
Mint d[n];
rep(i,n) d[i]=1;
rep(i,k){
	if(s[i]=='<'){
		rrep(j,i,n-(k-1-i)){
			Mint z;
			rep(l,i,j){
				if(a[l]<a[j]) z+=d[l];
			}
			d[j]=z;
		}
	}else{
		rrep(j,i,n){
			Mint z;
			rep(l,i,j){
				if(a[l]>a[j]) z+=d[l];
			}
			d[j]=z;
		}
	}
}
wt(sum(d(n)));
0