結果

問題 No.291 黒い文字列
ユーザー tailstails
提出日時 2015-10-16 23:45:30
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 410 bytes
コンパイル時間 139 ms
コンパイル使用メモリ 5,324 KB
実行使用メモリ 5,472 KB
最終ジャッジ日時 2023-09-29 02:00:58
合計ジャッジ時間 1,944 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,664 KB
testcase_01 AC 3 ms
4,804 KB
testcase_02 AC 3 ms
4,536 KB
testcase_03 AC 3 ms
4,824 KB
testcase_04 AC 3 ms
4,768 KB
testcase_05 AC 3 ms
4,836 KB
testcase_06 AC 3 ms
4,764 KB
testcase_07 AC 3 ms
4,660 KB
testcase_08 WA -
testcase_09 AC 3 ms
4,520 KB
testcase_10 AC 2 ms
4,668 KB
testcase_11 AC 9 ms
4,932 KB
testcase_12 AC 5 ms
4,572 KB
testcase_13 AC 2 ms
4,808 KB
testcase_14 AC 3 ms
4,664 KB
testcase_15 AC 3 ms
4,660 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 48 ms
5,068 KB
testcase_19 AC 105 ms
5,132 KB
testcase_20 AC 141 ms
5,472 KB
testcase_21 AC 3 ms
4,520 KB
testcase_22 WA -
testcase_23 AC 159 ms
4,960 KB
testcase_24 AC 12 ms
4,704 KB
testcase_25 AC 3 ms
4,536 KB
testcase_26 AC 3 ms
4,552 KB
testcase_27 AC 3 ms
4,736 KB
testcase_28 AC 3 ms
4,720 KB
testcase_29 AC 3 ms
4,604 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

@a=chr(0)x5;
for(<>=~/./g){
	if(y/KUROI//){
		$f=0;
		$i=index("KUROI",$_);
		@b=@a;@c=();
		for(@b){
			$f=++vec($_,$i,8),push@c,$_ if vec($_,$i,8)<($i?vec($_,$i-1,8):20);
		}
		if($f){
			@a=@c;
		}
	}
	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