結果

問題 No.240 ナイト散歩
ユーザー togaerrortogaerror
提出日時 2015-08-11 00:04:10
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 417 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 5,336 KB
実行使用メモリ 5,104 KB
最終ジャッジ日時 2023-09-25 07:59:45
合計ジャッジ時間 1,755 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
5,008 KB
testcase_01 AC 5 ms
4,908 KB
testcase_02 AC 6 ms
5,020 KB
testcase_03 AC 5 ms
4,908 KB
testcase_04 AC 5 ms
4,836 KB
testcase_05 AC 5 ms
4,844 KB
testcase_06 AC 5 ms
4,976 KB
testcase_07 AC 4 ms
5,044 KB
testcase_08 AC 5 ms
4,952 KB
testcase_09 AC 4 ms
5,088 KB
testcase_10 AC 5 ms
4,944 KB
testcase_11 AC 5 ms
5,100 KB
testcase_12 AC 4 ms
5,048 KB
testcase_13 AC 5 ms
5,100 KB
testcase_14 AC 4 ms
5,052 KB
testcase_15 AC 5 ms
4,852 KB
testcase_16 AC 5 ms
5,100 KB
testcase_17 AC 5 ms
4,940 KB
testcase_18 AC 4 ms
4,956 KB
testcase_19 AC 5 ms
4,948 KB
testcase_20 AC 5 ms
5,104 KB
testcase_21 AC 5 ms
4,960 KB
testcase_22 AC 5 ms
4,944 KB
testcase_23 AC 5 ms
4,948 KB
testcase_24 AC 5 ms
5,016 KB
testcase_25 AC 5 ms
4,948 KB
testcase_26 AC 4 ms
4,820 KB
testcase_27 AC 5 ms
5,012 KB
testcase_28 AC 5 ms
4,960 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 5 ms
4,956 KB
testcase_33 AC 5 ms
4,996 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use strict;
use warnings;

my ($x, $y) = split / /, <>;

if($x < 0) {
	$x *= -1;
}
if($y < 0) {
	$y *= -1;
}
if($x > $y) {
	($x, $y) = ($y, $x);
}


if(($x > 6)||($y > 6)) {
	print "NO\n";
	exit;
}

if((($x == 2)&&($y == 2))||(($x == 4)&&($y == 4))||(($x == 5)&&(($y == 1)||($y == 3)||($y == 5)))||($x == 6)&&((($y == 0)||($y == 2)||($y == 4)||($y == 5)||($y == 6)))) {
	print "NO\n";
	exit;
}

print "YES\n";

exit;
0