結果

問題 No.396 クラス替え
ユーザー convexineq
提出日時 2021-02-17 08:17:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 1,000 ms
コード長 182 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 82,192 KB
実行使用メモリ 53,568 KB
最終ジャッジ日時 2024-09-13 18:53:19
合計ジャッジ時間 1,692 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
x,y = map(int,input().split())
def pos(x):
    x = (x-1)%(2*m)
    if x < m: return x
    else: return 2*m-x-1
print("YES" if pos(x)==pos(y) else "NO")
0