結果

問題 No.33 アメーバがたくさん
ユーザー %20%20
提出日時 2017-06-12 03:35:56
言語 Perl
(5.38.2)
結果
AC  
実行時間 8 ms / 5,000 ms
コード長 208 bytes
コンパイル時間 398 ms
コンパイル使用メモリ 6,180 KB
実行使用メモリ 6,268 KB
最終ジャッジ日時 2023-10-24 21:26:17
合計ジャッジ時間 1,189 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
6,268 KB
testcase_01 AC 7 ms
6,260 KB
testcase_02 AC 8 ms
6,268 KB
testcase_03 AC 8 ms
6,268 KB
testcase_04 AC 7 ms
6,268 KB
testcase_05 AC 7 ms
6,268 KB
testcase_06 AC 7 ms
6,268 KB
testcase_07 AC 7 ms
6,268 KB
testcase_08 AC 8 ms
6,268 KB
testcase_09 AC 7 ms
6,268 KB
testcase_10 AC 8 ms
6,268 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::N" used only once: possible typo at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #

($N,$D,$T)=glob<>;
@X=sort{$a%$D-$b%$D||$a-$b}map$_+1e9,glob<>;
for(@X){
	if( defined$p && $_%$D==$p%$D && ($_/$D|0)-$T<=$m ){
		$%+=($_/$D|0)+$T-$m
	}else{
		$%+=2*$T+1
	}
	$m=($_/$D|0)+$T;
	$p=$_
}
print$%
0