結果

問題 No.3347 Guess The Array
コンテスト
ユーザー 👑 tails
提出日時 2025-12-26 11:37:19
言語 Perl
(5.40.0)
結果
AC  
実行時間 629 ms / 2,000 ms
コード長 265 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 172 ms
コンパイル使用メモリ 7,976 KB
実行使用メモリ 26,212 KB
平均クエリ数 3795.89
最終ジャッジ日時 2025-12-26 11:37:42
合計ジャッジ時間 21,468 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 46
権限があれば一括ダウンロードができます
コンパイルメッセージ
Unquoted string "a" may clash with future reserved word at Main.pl line 13.
Unquoted string "b" may clash with future reserved word at Main.pl line 13.
Main.pl syntax OK

ソースコード

diff #
raw source code

use feature 'say';
$|=1;
$,=$";
$n=<>;
$i=1;
$j=1;
$b=1;
while(@a<$n){
	$a=-1;
	while($a+1<$b){
		$c=$a<0?0:$a+$b>>1;
		say"?",$c+$j,@a[0..$c-1],($i)x$j;
		${<>=~Y?a:b}=$c;
	}
	if($a<0){
		++$i;
		$j=1;
		$b=@a+1;
	}else{
		splice@a,$a,0,$i;
		++$j;
	}
}
say"!",@a;
0