結果

問題 No.2719 Equal Inner Products in Permutation
ユーザー tailstails
提出日時 2024-04-10 17:52:23
言語 Perl
(5.40.0)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 672 bytes
コンパイル時間 2,093 ms
コンパイル使用メモリ 108,928 KB
実行使用メモリ 44,544 KB
最終ジャッジ日時 2024-10-02 20:19:52
合計ジャッジ時間 8,586 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 30
権限があれば一括ダウンロードができます
コンパイルメッセージ
Unquoted string "a" may clash with future reserved word at Main.pl line 20.
Unquoted string "b" may clash with future reserved word at Main.pl line 20.
Unquoted string "c" may clash with future reserved word at Main.pl line 20.
Main.pl syntax OK

ソースコード

diff #

sub w{open(X,">",@_);select(X);}
sub r{"dd if=$_[0]".($n%3)." bs=".($n*7)." count=1 status=none;";}
CHECK{
	if($^C){
		@0=map{$_*9+1,$_*9+2,$_*9+9}0..199999;
		@1=map{$_*9+6,$_*9+8,$_*9+7}0..199999;
		@2=map{$_*9+3,$_*9+4,$_*9+5}0..199999;
		w(a0);printf " %6d",$_ for@0;
		w(b0);printf " %6d",$_ for@1;
		w(c0);printf " %6d",$_ for@2;
		w(a2);printf " %6d",$_ for 1,4,map$_+6,@0;
		w(b2);printf " %6d",$_ for 3,6,map$_+6,@1;
		w(c2);printf " %6d",$_ for 5,2,map$_+6,@2;
		w(a1);printf " %6d",$_ for 1,2,4,11,map$_+12,@0;
		w(b1);printf " %6d",$_ for 7,9,10,12,map$_+12,@1;
		w(c1);printf " %6d",$_ for 8,5,6,3,map$_+12,@2;
	}
}
$n=<>;
$n<2?print-1:system(r(a).r(b).r(c))
0