結果

問題 No.469 区間加算と一致検索の問題
ユーザー %20%20
提出日時 2016-12-19 10:59:50
言語 Perl
(5.38.2)
結果
AC  
実行時間 1,513 ms / 5,000 ms
コード長 258 bytes
コンパイル時間 405 ms
コンパイル使用メモリ 5,384 KB
実行使用メモリ 105,004 KB
最終ジャッジ日時 2023-08-23 13:25:04
合計ジャッジ時間 32,032 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
5,128 KB
testcase_01 AC 6 ms
5,372 KB
testcase_02 AC 41 ms
11,576 KB
testcase_03 AC 43 ms
6,772 KB
testcase_04 AC 51 ms
6,980 KB
testcase_05 AC 58 ms
7,316 KB
testcase_06 AC 66 ms
7,776 KB
testcase_07 AC 71 ms
7,912 KB
testcase_08 AC 78 ms
8,300 KB
testcase_09 AC 34 ms
6,328 KB
testcase_10 AC 73 ms
5,564 KB
testcase_11 AC 26 ms
5,944 KB
testcase_12 AC 82 ms
8,476 KB
testcase_13 AC 51 ms
7,188 KB
testcase_14 AC 19 ms
5,676 KB
testcase_15 AC 29 ms
6,132 KB
testcase_16 AC 75 ms
8,176 KB
testcase_17 AC 65 ms
7,744 KB
testcase_18 AC 68 ms
7,976 KB
testcase_19 AC 17 ms
5,752 KB
testcase_20 AC 81 ms
8,464 KB
testcase_21 AC 22 ms
5,784 KB
testcase_22 AC 8 ms
5,320 KB
testcase_23 AC 461 ms
23,240 KB
testcase_24 AC 432 ms
23,184 KB
testcase_25 AC 440 ms
23,120 KB
testcase_26 AC 450 ms
23,160 KB
testcase_27 AC 447 ms
23,096 KB
testcase_28 AC 441 ms
23,220 KB
testcase_29 AC 445 ms
23,028 KB
testcase_30 AC 467 ms
23,148 KB
testcase_31 AC 435 ms
23,064 KB
testcase_32 AC 434 ms
23,084 KB
testcase_33 AC 1,473 ms
105,004 KB
testcase_34 AC 1,467 ms
104,996 KB
testcase_35 AC 1,467 ms
104,992 KB
testcase_36 AC 1,470 ms
104,792 KB
testcase_37 AC 1,513 ms
104,856 KB
testcase_38 AC 1,350 ms
96,912 KB
testcase_39 AC 1,328 ms
97,008 KB
testcase_40 AC 1,346 ms
97,012 KB
testcase_41 AC 1,358 ms
96,964 KB
testcase_42 AC 1,352 ms
96,952 KB
testcase_43 AC 1,361 ms
96,936 KB
testcase_44 AC 1,342 ms
97,172 KB
testcase_45 AC 1,343 ms
96,812 KB
testcase_46 AC 1,365 ms
96,988 KB
testcase_47 AC 1,353 ms
97,012 KB
testcase_48 AC 7 ms
5,176 KB
testcase_49 AC 6 ms
5,100 KB
testcase_50 AC 1,354 ms
96,992 KB
testcase_51 AC 1,340 ms
97,008 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$b=0|rand($m=1000000007);
$B=0|rand($M=1000000005);
$h[0]=$H[0]=1;
$h[$_]=$h[$_-1]*$b%$m,$H[$_]=$H[$_-1]*$B%$M for 1..<>;
$h{0}{0}=0;
	($q,$L,$R,$K)=glob,
	'!'eq$q?
		$h{$h+=$K*($h[$L]-$h[$R])}{$H+=$K*($H[$L]-$H[$R])}//=$.-1
	:
		print$h{$h}{$H}+0,$/
while<>
0