結果

問題 No.1379 Postponed
コンテスト
ユーザー 👑 tails
提出日時 2021-02-10 15:06:21
言語 Perl
(5.42.1)
コンパイル:
perl -cw _filename_
実行:
perl -X _filename_
結果
AC  
実行時間 4 ms / 2,000 ms
+ 887µs
コード長 196 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 740 ms
コンパイル使用メモリ 6,144 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-08-12 01:52:06
合計ジャッジ時間 3,523 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 64
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::n" used only once: possible typo at Main.pl line 13.
Main.pl syntax OK

ソースコード

diff #
raw source code

use integer;

sub f{
	my$p=$a[$o]-$o;
	my$r=($k-1)%($p+1);
	$k=($k-1)/($p+1)*$p+$r;
	++$o;
	$k&&&f;
	--$o;
	@a[$o..$o+$p-$r]=@a[$o+1..$o+$p-$r,$o];
}

($n,$k)=glob<>;
@a=glob<>;
$k&&f;
print"@a";
0