結果

問題 No.291 黒い文字列
ユーザー tailstails
提出日時 2015-10-16 23:32:53
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 311 bytes
コンパイル時間 244 ms
コンパイル使用メモリ 5,328 KB
実行使用メモリ 5,784 KB
最終ジャッジ日時 2023-09-29 01:58:03
合計ジャッジ時間 2,535 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,696 KB
testcase_01 WA -
testcase_02 AC 3 ms
4,564 KB
testcase_03 AC 2 ms
4,800 KB
testcase_04 AC 2 ms
4,664 KB
testcase_05 AC 2 ms
4,496 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 3 ms
4,568 KB
testcase_09 AC 3 ms
4,504 KB
testcase_10 WA -
testcase_11 AC 8 ms
4,708 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 3 ms
4,660 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 84 ms
4,980 KB
testcase_18 WA -
testcase_19 AC 153 ms
4,920 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 158 ms
4,900 KB
testcase_24 WA -
testcase_25 AC 3 ms
4,560 KB
testcase_26 AC 3 ms
4,480 KB
testcase_27 AC 3 ms
4,780 KB
testcase_28 AC 3 ms
4,636 KB
testcase_29 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

@a=chr(0)x5;
for(<>=~/./g){
	if(y/KUROI//){
		$i=index("KUROI",$_);
		for(@a){
			++vec($_,$i,8);
		}
	}
	if(y/?//){
		my%h;
		for(@a){
			for$i(0..4){
				$a=$_;
				++vec($a,$i,8),$h{$a}=0 if vec($a,$i,8)<($i?vec($a,$i-1,8):20);
			}
		}
		@a=keys%h;
	}
}
$b<vec($_,4,8) and $b=vec($_,4,8) for@a;
print $b+0;
0