結果

問題 No.120 傾向と対策:門松列(その1)
ユーザー kotatsugamekotatsugame
提出日時 2018-04-12 15:39:48
言語 Perl
(5.38.2)
結果
AC  
実行時間 386 ms / 5,000 ms
コード長 193 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 5,268 KB
実行使用メモリ 5,212 KB
最終ジャッジ日時 2023-09-09 04:18:05
合計ジャッジ時間 2,244 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 272 ms
5,080 KB
testcase_01 AC 386 ms
5,144 KB
testcase_02 AC 169 ms
5,188 KB
testcase_03 AC 386 ms
5,212 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

<>;
while(<>){
	$s=0;
	%t={};
	@a=map$t{$_},grep!$t{$_}++,glob<>;
	if(@a>2)
	{
		while($a[2]>0)
		{
			@a=sort{$b-$a}@a;
			$s++;
			$a[$_]--for 0..2;
			@a=sort{$b-$a}@a;
		}
	}
	print$s,$/
}
0