結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,668 KB
testcase_01 AC 3 ms
4,528 KB
testcase_02 AC 3 ms
4,652 KB
testcase_03 AC 3 ms
4,668 KB
testcase_04 AC 3 ms
4,840 KB
testcase_05 AC 3 ms
4,528 KB
testcase_06 AC 2 ms
4,532 KB
testcase_07 AC 2 ms
4,604 KB
testcase_08 WA -
testcase_09 AC 3 ms
4,672 KB
testcase_10 AC 3 ms
4,708 KB
testcase_11 AC 9 ms
4,912 KB
testcase_12 AC 4 ms
4,900 KB
testcase_13 AC 2 ms
4,532 KB
testcase_14 AC 2 ms
4,828 KB
testcase_15 AC 2 ms
4,656 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 48 ms
5,148 KB
testcase_19 AC 104 ms
5,000 KB
testcase_20 AC 141 ms
5,076 KB
testcase_21 AC 3 ms
4,856 KB
testcase_22 WA -
testcase_23 AC 159 ms
5,004 KB
testcase_24 AC 12 ms
4,816 KB
testcase_25 AC 3 ms
4,668 KB
testcase_26 AC 3 ms
4,604 KB
testcase_27 AC 3 ms
4,516 KB
testcase_28 AC 3 ms
4,820 KB
testcase_29 AC 3 ms
4,552 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

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