結果

問題 No.396 クラス替え
ユーザー shi-moshi-mo
提出日時 2016-10-12 23:46:27
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 183 bytes
コンパイル時間 121 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-05-01 19:48:30
合計ジャッジ時間 2,719 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
12,160 KB
testcase_01 AC 88 ms
12,416 KB
testcase_02 AC 89 ms
12,416 KB
testcase_03 AC 88 ms
12,288 KB
testcase_04 AC 88 ms
12,416 KB
testcase_05 AC 91 ms
12,160 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 88 ms
12,160 KB
testcase_09 WA -
testcase_10 AC 88 ms
12,160 KB
testcase_11 AC 88 ms
12,288 KB
testcase_12 AC 90 ms
12,288 KB
testcase_13 AC 88 ms
12,416 KB
testcase_14 AC 89 ms
12,160 KB
testcase_15 AC 88 ms
12,160 KB
testcase_16 AC 87 ms
12,160 KB
testcase_17 AC 88 ms
12,160 KB
testcase_18 AC 89 ms
12,288 KB
testcase_19 AC 90 ms
12,160 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n, m = gets.split.map(&:to_i)
x, y = gets.split.map(&:to_i)

mx = (x-1) % (2*m)
my = (y-1) % (2*m)
m2x = 2*m - x
m2y = 2*m - y
puts (mx == my || mx == m2y || m2x == my) ? 'YES' : 'NO'
0