結果

問題 No.1031 いたずら好きなお姉ちゃん
コンテスト
ユーザー 👑 tails
提出日時 2020-12-15 19:48:52
言語 Perl
(5.42.1)
コンパイル:
perl -cw _filename_
実行:
perl -X _filename_
結果
AC  
実行時間 462 ms / 3,500 ms
コード長 223 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 66 ms
コンパイル使用メモリ 8,100 KB
実行使用メモリ 32,512 KB
最終ジャッジ日時 2026-04-08 14:33:29
合計ジャッジ時間 16,148 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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 #
raw source code

<>;
@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