結果

問題 No.396 クラス替え
ユーザー roaris
提出日時 2019-12-12 17:08:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 1,000 ms
コード長 226 bytes
コンパイル時間 327 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 52,352 KB
最終ジャッジ日時 2024-06-25 05:45:22
合計ジャッジ時間 1,778 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
X, Y = map(int, input().split())
X -= 1
Y -= 1

if X//M%2==0:
    A = X%M
else:
    A = M-1-X%M

if Y//M%2==0:
    B = Y%M
else:
    B = M-1-Y%M

if A==B:
    print('YES')
else:
    print('NO')
0