結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,520 KB
testcase_01 AC 3 ms
4,784 KB
testcase_02 AC 3 ms
4,572 KB
testcase_03 AC 2 ms
4,704 KB
testcase_04 AC 2 ms
4,508 KB
testcase_05 AC 3 ms
4,808 KB
testcase_06 AC 3 ms
4,680 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 3 ms
4,688 KB
testcase_10 WA -
testcase_11 AC 11 ms
4,712 KB
testcase_12 AC 6 ms
4,856 KB
testcase_13 AC 2 ms
4,496 KB
testcase_14 AC 3 ms
4,528 KB
testcase_15 AC 3 ms
4,636 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 160 ms
5,068 KB
testcase_20 AC 221 ms
5,260 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 250 ms
5,120 KB
testcase_24 WA -
testcase_25 AC 3 ms
4,780 KB
testcase_26 AC 3 ms
4,572 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

sub a {
	($i)=@_;
	$a=$_;
	vec($a,$i,8)<($i?vec($a,$i-1,8):20) ? ++vec($a,$i,8)&&$a : 0;
}

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