結果

問題 No.996 Phnom Penh
ユーザー %20%20
提出日時 2020-02-21 23:11:40
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 268 bytes
コンパイル時間 758 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 7,936 KB
最終ジャッジ日時 2024-04-17 09:14:23
合計ジャッジ時間 1,338 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
5,248 KB
testcase_01 AC 3 ms
5,376 KB
testcase_02 AC 4 ms
5,376 KB
testcase_03 AC 3 ms
5,376 KB
testcase_04 AC 3 ms
5,376 KB
testcase_05 AC 3 ms
5,376 KB
testcase_06 AC 3 ms
5,376 KB
testcase_07 AC 4 ms
5,376 KB
testcase_08 AC 4 ms
5,376 KB
testcase_09 AC 4 ms
5,376 KB
testcase_10 AC 4 ms
5,376 KB
testcase_11 AC 4 ms
5,376 KB
testcase_12 AC 3 ms
5,376 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 4 ms
5,376 KB
testcase_20 WA -
testcase_21 AC 3 ms
5,376 KB
testcase_22 WA -
testcase_23 AC 4 ms
5,376 KB
testcase_24 WA -
testcase_25 AC 30 ms
7,936 KB
testcase_26 AC 27 ms
7,296 KB
testcase_27 AC 33 ms
7,936 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$S=<>;
{
	$_=$S;
	s/h//g;
	y/e/h/;
	$x=1;
	$M=0;
	s{phn(om)+}{
		$t=(-3+length$&)/2;
		$x+=$t;
		$M=$t+1 if $t+1>$M
	}ge;
	$z=$x+$M;
}
{
	$_=$S;
	$x=0;
	$M=0;
	s{phn(om)+}{
		$t=(-3+length$&)/2;
		$x+=$t;
		$M=$t+1 if $t+1>$M
	}ge;
	$z=$x+$M if $x+$M>$z;
}
print$z,$/
0