結果
| 問題 | No.396 クラス替え |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-11 08:42:51 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 221 bytes |
| 記録 | |
| コンパイル時間 | 230 ms |
| コンパイル使用メモリ | 84,608 KB |
| 実行使用メモリ | 52,096 KB |
| 最終ジャッジ日時 | 2026-05-11 08:42:58 |
| 合計ジャッジ時間 | 3,805 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 WA * 2 |
ソースコード
N,M = map(int, input().split())
x,y = map(int, input().split())
if x>y:
x,y = y,x
if (y-x)%(2*M)==0:
print("YES")
else:
y = y%M
x = x%M
if (y+x)%M==1:
print("YES")
else:
print("NO")