結果
問題 | No.396 クラス替え |
ユーザー |
![]() |
提出日時 | 2016-07-15 22:44:13 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 97 ms / 1,000 ms |
コード長 | 159 bytes |
コンパイル時間 | 53 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-11-17 10:46:08 |
合計ジャッジ時間 | 2,733 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
n,m,x,y = $<.read.split.map(&:to_i) x -= 1 y -= 1 x = x%(2*m) y = y%(2*m) x = x >= m ? m-1-(x-m) : x y = y >= m ? m-1-(y-m) : y puts x == y ? "YES" : "NO"