結果

問題 No.624 Santa Claus and The Last Dungeon
ユーザー tailstails
提出日時 2017-12-26 11:55:03
言語 Perl
(5.38.0)
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 856 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 5,212 KB
実行使用メモリ 24,496 KB
平均クエリ数 399.28
最終ジャッジ日時 2023-09-23 15:27:47
合計ジャッジ時間 4,121 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
23,860 KB
testcase_01 AC 53 ms
23,428 KB
testcase_02 AC 51 ms
23,884 KB
testcase_03 AC 53 ms
23,440 KB
testcase_04 AC 55 ms
23,692 KB
testcase_05 AC 51 ms
23,668 KB
testcase_06 AC 51 ms
23,668 KB
testcase_07 AC 51 ms
24,040 KB
testcase_08 AC 50 ms
24,040 KB
testcase_09 AC 51 ms
23,380 KB
testcase_10 AC 52 ms
24,304 KB
testcase_11 AC 50 ms
23,848 KB
testcase_12 AC 50 ms
24,328 KB
testcase_13 AC 51 ms
24,064 KB
testcase_14 AC 51 ms
23,656 KB
testcase_15 AC 50 ms
23,380 KB
testcase_16 AC 51 ms
23,668 KB
testcase_17 AC 51 ms
24,076 KB
testcase_18 AC 51 ms
23,428 KB
testcase_19 AC 56 ms
23,680 KB
testcase_20 AC 54 ms
23,728 KB
testcase_21 AC 55 ms
24,496 KB
testcase_22 AC 53 ms
23,440 KB
testcase_23 AC 55 ms
23,692 KB
testcase_24 AC 53 ms
23,428 KB
testcase_25 AC 51 ms
24,040 KB
testcase_26 AC 52 ms
24,328 KB
testcase_27 AC 53 ms
24,328 KB
testcase_28 AC 52 ms
24,244 KB
testcase_29 AC 51 ms
23,680 KB
testcase_30 AC 52 ms
24,064 KB
testcase_31 AC 52 ms
24,052 KB
testcase_32 AC 51 ms
23,572 KB
testcase_33 AC 52 ms
23,644 KB
testcase_34 AC 52 ms
23,428 KB
testcase_35 AC 53 ms
24,052 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Possible precedence problem on bitwise ^ operator at Main.pl line 16.
Possible precedence problem on bitwise ^ operator at Main.pl line 30.
Possible precedence problem on bitwise ^ operator at Main.pl line 31.
Possible precedence problem on bitwise ^ operator at Main.pl line 36.
Possible precedence problem on bitwise ^ operator at Main.pl line 41.
Main.pl syntax OK

ソースコード

diff #

sub p{
	print"@_\n";
	(glob<>)[2];
}
$|=<>;
@k=0..99;
for(0..49){
	$d0=sprintf("%02d",$_*2);
	$d1=sprintf("%02d",$_*2+1);
	@kc=@k;
	while(1){
		$mc=$kc[@kc/2];
		$r=p+($d0)x$mc,($d1)x(100-$mc);
		last if $r!=1;
		$r=p+('??')x$mc,($d1)x(100-$mc);
		@kc=grep$r^$_<$mc,@kc;
	}
	($d0,$d1)=($d1,$d0)if!$r;
	@k0=@kc[0..@kc/2-1];
	@k1=@kc[@kc/2..$#kc];
	while(@k0>1&&@k1>1){
		$m0=$k0[@k0/2];
		$m1=$k1[@k1/2];
		$x=0;
		$r=p+($d0)x$m0,($d1)x($m1-$m0),($d0)x(100-$m1);
		if($r==1){
			$x=1;
			$r=p+($d0)x$m0,('??')x(100-$m0);
		}
		@k0=grep$r==0^$_<$m0,@k0;
		@k1=grep$r==$x^$_<$m1,@k1;
	}
	while(@k0>1){
		$m0=$k0[@k0/2];
		$r=p+('??')x$m0,($d0)x(100-$m0);
		@k0=grep$r^$_<$m0,@k0;
	}
	while(@k1>1){
		$m1=$k1[@k1/2];
		$r=p+('??')x$m1,($d1)x(100-$m1);
		@k1=grep$r^$_<$m1,@k1;
	}
	@k=grep{$_!=$k0[0]&&$_!=$k1[0]}@k;
	@a[$k0[0],$k1[0]]=($d0,$d1);
}
print"@a\n";
0