結果

問題 No.1031 いたずら好きなお姉ちゃん
ユーザー tails
提出日時 2020-12-15 19:48:52
言語 Perl
(5.40.0)
結果
AC  
実行時間 687 ms / 3,500 ms
コード長 223 bytes
コンパイル時間 117 ms
コンパイル使用メモリ 5,760 KB
実行使用メモリ 32,280 KB
最終ジャッジ日時 2024-09-20 02:04:08
合計ジャッジ時間 23,251 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 53
権限があれば一括ダウンロードができます
コンパイルメッセージ
Possible precedence problem on bitwise | operator at Main.pl line 4.
Possible precedence problem on bitwise ^ operator at Main.pl line 7.
Unquoted string "a" may clash with future reserved word at Main.pl line 11.
Unquoted string "b" may clash with future reserved word at Main.pl line 11.
Main.pl syntax OK

ソースコード

diff #

<>;
@a=glob<>;
map{
	$x=$a[$i++]<$_|0;
	$y=$x^1;
	$%+=push@$x,$i-1;
	pop@$y while@$y&&$a[$$y[-1]]<$_^$y;
	if(@$y){
		$j=$$y[-1];
		$a=-1;$b=@$x;
		${$$x[$c]<$j?a:b}=$c=$a+$b>>1while$a+1<$b;
		$%-=$b;
	}
}@a[1..$#a];
print$%
0