結果

問題 No.3126 Dual Query Problem
ユーザー tails
提出日時 2025-04-25 21:47:02
言語 Perl
(5.40.0)
結果
AC  
実行時間 209 ms / 2,000 ms
コード長 161 bytes
コンパイル時間 364 ms
コンパイル使用メモリ 7,844 KB
実行使用メモリ 46,592 KB
最終ジャッジ日時 2025-06-20 02:43:27
合計ジャッジ時間 12,328 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 33
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::n" used only once: possible typo at Main.pl line 1.
Name "main::a" used only once: possible typo at Main.pl line 4.
Main.pl syntax OK

ソースコード

diff #

($n,$q)=glob<>;
for(<>){
	$_+=0;
	if(!$a{$_}++){
		push@b,"1 $_ $_\n";
	}
	push@b,"2 $_\n";
}
if(@b>$q){
	print"No";
	exit;
}
print"Yes\n",@b,"1 1 1\n"x($q-@b);
0