結果

問題 No.1148 土偶Ⅲ
ユーザー tailstails
提出日時 2020-08-05 19:41:35
言語 Perl
(5.38.2)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 178 bytes
コンパイル時間 549 ms
コンパイル使用メモリ 6,000 KB
実行使用メモリ 27,728 KB
最終ジャッジ日時 2023-10-17 11:42:27
合計ジャッジ時間 2,726 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
6,068 KB
testcase_01 AC 8 ms
6,064 KB
testcase_02 AC 8 ms
6,068 KB
testcase_03 AC 7 ms
6,072 KB
testcase_04 AC 8 ms
6,068 KB
testcase_05 AC 42 ms
13,704 KB
testcase_06 AC 118 ms
27,728 KB
testcase_07 AC 79 ms
21,164 KB
testcase_08 AC 105 ms
25,388 KB
testcase_09 AC 102 ms
24,976 KB
testcase_10 AC 45 ms
14,416 KB
testcase_11 AC 97 ms
25,028 KB
testcase_12 AC 12 ms
7,188 KB
testcase_13 AC 17 ms
8,344 KB
testcase_14 AC 15 ms
7,828 KB
testcase_15 AC 72 ms
19,940 KB
testcase_16 AC 30 ms
11,120 KB
testcase_17 AC 110 ms
26,948 KB
testcase_18 AC 10 ms
6,620 KB
testcase_19 AC 47 ms
14,788 KB
testcase_20 AC 58 ms
17,116 KB
testcase_21 AC 45 ms
14,480 KB
testcase_22 AC 13 ms
7,312 KB
testcase_23 AC 21 ms
8,764 KB
testcase_24 AC 29 ms
10,224 KB
testcase_25 AC 32 ms
10,712 KB
testcase_26 AC 99 ms
23,816 KB
testcase_27 AC 19 ms
8,312 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($n,$w)=glob<>;
@a=<>;
while($b<$n){
	$s+=$a[$b];
	while($s>$w || $h{$a[$b]}){
		$s-=$a[$a];
		$h{$a[$a]}=0;
		$a++;
	}
	$h{$a[$b]}=1;
	++$b;
	$z=$b-$a if $z<$b-$a;
}
print$z+0;
0