結果

問題 No.871 かえるのうた
ユーザー tailstails
提出日時 2019-08-30 22:09:31
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 265 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 6,820 KB
実行使用メモリ 41,856 KB
最終ジャッジ日時 2024-05-01 18:12:25
合計ジャッジ時間 11,351 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
5,760 KB
testcase_01 WA -
testcase_02 AC 7 ms
5,760 KB
testcase_03 AC 8 ms
5,760 KB
testcase_04 AC 8 ms
5,888 KB
testcase_05 AC 8 ms
5,888 KB
testcase_06 WA -
testcase_07 AC 8 ms
6,016 KB
testcase_08 AC 21 ms
7,040 KB
testcase_09 AC 24 ms
7,168 KB
testcase_10 AC 11 ms
6,144 KB
testcase_11 AC 14 ms
6,400 KB
testcase_12 AC 108 ms
12,856 KB
testcase_13 AC 31 ms
7,424 KB
testcase_14 AC 538 ms
39,640 KB
testcase_15 AC 551 ms
39,632 KB
testcase_16 AC 636 ms
41,480 KB
testcase_17 AC 554 ms
37,496 KB
testcase_18 AC 98 ms
13,072 KB
testcase_19 WA -
testcase_20 AC 62 ms
8,832 KB
testcase_21 AC 245 ms
18,336 KB
testcase_22 AC 8 ms
5,888 KB
testcase_23 AC 8 ms
5,760 KB
testcase_24 AC 8 ms
5,888 KB
testcase_25 AC 19 ms
6,656 KB
testcase_26 AC 57 ms
9,472 KB
testcase_27 AC 82 ms
11,452 KB
testcase_28 AC 8 ms
5,888 KB
testcase_29 AC 307 ms
28,568 KB
testcase_30 AC 515 ms
31,604 KB
testcase_31 AC 23 ms
6,912 KB
testcase_32 AC 480 ms
29,600 KB
testcase_33 WA -
testcase_34 AC 171 ms
15,664 KB
testcase_35 AC 375 ms
27,824 KB
testcase_36 AC 505 ms
35,576 KB
testcase_37 AC 285 ms
20,268 KB
testcase_38 AC 660 ms
38,296 KB
testcase_39 WA -
testcase_40 AC 327 ms
29,356 KB
testcase_41 AC 8 ms
5,888 KB
testcase_42 AC 271 ms
29,232 KB
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 AC 8 ms
5,888 KB
testcase_47 AC 8 ms
5,888 KB
testcase_48 AC 8 ms
5,888 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($n,$k)=glob<>;
@x=glob<>;
@a=glob<>;
--$k;
$r=$x[$k]+$a[$k];
for($k..$n-1){
	last if $x[$_]>$r;
	++$m;
	$r=$x[$_]+$a[$_] if $r<$x[$_]+$a[$_];

}
$r=$x[$k]-$a[$k];
for(reverse 0..$k-1){
	last if $x[$_]<$r;
	++$m;
	$r=$x[$_]-$a[$_] if $r>$x[$_]-$a[$_];

}
print $m;
0