結果

問題 No.1996 <><
ユーザー tailstails
提出日時 2023-03-14 16:48:34
言語 cLay
(20240104-1)
結果
AC  
実行時間 18 ms / 2,000 ms
コード長 308 bytes
コンパイル時間 7,197 ms
コンパイル使用メモリ 221,844 KB
実行使用メモリ 7,748 KB
最終ジャッジ日時 2023-10-18 11:53:55
合計ジャッジ時間 8,312 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,724 KB
testcase_01 AC 2 ms
7,724 KB
testcase_02 AC 2 ms
7,724 KB
testcase_03 AC 2 ms
7,724 KB
testcase_04 AC 3 ms
7,724 KB
testcase_05 AC 2 ms
7,724 KB
testcase_06 AC 2 ms
7,724 KB
testcase_07 AC 2 ms
7,724 KB
testcase_08 AC 3 ms
7,728 KB
testcase_09 AC 3 ms
7,724 KB
testcase_10 AC 2 ms
7,728 KB
testcase_11 AC 18 ms
7,748 KB
testcase_12 AC 3 ms
7,748 KB
testcase_13 AC 3 ms
7,748 KB
testcase_14 AC 5 ms
7,748 KB
testcase_15 AC 7 ms
7,744 KB
testcase_16 AC 10 ms
7,744 KB
testcase_17 AC 5 ms
7,744 KB
testcase_18 AC 11 ms
7,744 KB
testcase_19 AC 13 ms
7,744 KB
testcase_20 AC 17 ms
7,748 KB
testcase_21 AC 8 ms
7,744 KB
testcase_22 AC 8 ms
7,748 KB
testcase_23 AC 2 ms
7,728 KB
testcase_24 AC 7 ms
7,744 KB
testcase_25 AC 5 ms
7,736 KB
testcase_26 AC 12 ms
7,744 KB
testcase_27 AC 4 ms
7,732 KB
testcase_28 AC 2 ms
7,724 KB
testcase_29 AC 8 ms
7,736 KB
testcase_30 AC 2 ms
7,728 KB
testcase_31 AC 3 ms
7,732 KB
testcase_32 AC 3 ms
7,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,@k,@a[n];
string@s;
coordcomp(n,a);
Mint d[n];
rep(i,n) d[i]=1;
fenwick<Mint>f;
f.malloc(n);
rep(i,k){
	f.init(n);
	if(s[i]=='<'){
		rep(j,i,n-(k-1-i)){
			f.add(a[j],d[j]);
			d[j]=f.get(a[j]-1);
		}
	}else{
		rep(j,i,n-(k-1-i)){
			f.add(a[j],d[j]);
			d[j]=f.range(a[j]+1,n);
		}
	}
}
wt(sum(d(n)));
0