結果

問題 No.647 明太子
ユーザー tailstails
提出日時 2018-02-09 22:34:43
言語 Perl
(5.38.0)
結果
AC  
実行時間 1,124 ms / 4,500 ms
コード長 271 bytes
コンパイル時間 455 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 7,144 KB
最終ジャッジ日時 2023-09-09 09:23:03
合計ジャッジ時間 5,070 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,124 KB
testcase_01 AC 6 ms
5,196 KB
testcase_02 AC 6 ms
5,316 KB
testcase_03 AC 6 ms
5,128 KB
testcase_04 AC 6 ms
5,180 KB
testcase_05 AC 6 ms
5,084 KB
testcase_06 AC 6 ms
5,116 KB
testcase_07 AC 7 ms
5,160 KB
testcase_08 AC 7 ms
5,272 KB
testcase_09 AC 20 ms
5,464 KB
testcase_10 AC 31 ms
5,288 KB
testcase_11 AC 13 ms
5,244 KB
testcase_12 AC 27 ms
5,292 KB
testcase_13 AC 51 ms
5,380 KB
testcase_14 AC 470 ms
6,956 KB
testcase_15 AC 73 ms
5,564 KB
testcase_16 AC 25 ms
5,144 KB
testcase_17 AC 585 ms
6,952 KB
testcase_18 AC 632 ms
7,124 KB
testcase_19 AC 191 ms
6,864 KB
testcase_20 AC 193 ms
6,448 KB
testcase_21 AC 76 ms
5,648 KB
testcase_22 AC 1,124 ms
7,144 KB
testcase_23 AC 9 ms
5,120 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$n=<>;
for$i(1..$n){
	($a[$i],$b[$i])=glob<>;
}
$m=<>;
for$j(1..$m){
	($x,$y)=glob<>;
	for$i(1..$n){
		if($x<=$a[$i]&&$y>=$b[$i]){
			++$c[$j];
		}
	}
	if($d<$c[$j]){
		$d=$c[$j];
	}
}
if($d==0){
	print 0;
}else{
	for$j(1..$m){
		if($c[$j]==$d){
			print $j,$/;
		}
	}
}
0