結果

問題 No.859 路線A、路線B、路線C
ユーザー tailstails
提出日時 2019-08-09 23:11:25
言語 Perl
(5.38.2)
結果
AC  
実行時間 7 ms / 1,000 ms
コード長 358 bytes
コンパイル時間 428 ms
コンパイル使用メモリ 5,292 KB
実行使用メモリ 5,272 KB
最終ジャッジ日時 2023-09-26 21:52:27
合計ジャッジ時間 1,358 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,068 KB
testcase_01 AC 6 ms
5,272 KB
testcase_02 AC 6 ms
5,176 KB
testcase_03 AC 6 ms
5,104 KB
testcase_04 AC 6 ms
5,100 KB
testcase_05 AC 6 ms
5,080 KB
testcase_06 AC 6 ms
5,112 KB
testcase_07 AC 6 ms
5,164 KB
testcase_08 AC 6 ms
5,196 KB
testcase_09 AC 6 ms
5,116 KB
testcase_10 AC 6 ms
5,212 KB
testcase_11 AC 6 ms
5,196 KB
testcase_12 AC 7 ms
5,136 KB
testcase_13 AC 6 ms
5,068 KB
testcase_14 AC 6 ms
5,244 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::B" used only once: possible typo at Main.pl line 1.
Name "main::C" used only once: possible typo at Main.pl line 1.
Name "main::A" used only once: possible typo at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #

($A,$B,$C)=glob<>;
($s0,$t0)=glob<>;
($s1,$t1)=glob<>;
if($s0 eq $s1){
	($t0,$t1)=($t1,$t0)if$t0>$t1;
	push@a,$t1-$t0;
	push@a,($t0-1)+1+($$_-1)+1+($$s0-$t1) for A..C;
}else{
	push@a,($t0-1)+1+($t1-1);
	push@a,($$s0-$t0)+1+($$s1-$t1);
	push@a,($t0-1)+1+($$_-1)+1+($$s1-$t1) for A..C;
	push@a,($$s0-$t0)+1+($$_-1)+1+($t1-1) for A..C;
}
printf sort{$a<=>$b}@a;
0