結果

問題 No.396 クラス替え
ユーザー O2MTO2MT
提出日時 2020-08-16 17:26:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 295 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 8,044 KB
最終ジャッジ日時 2023-08-01 19:20:53
合計ジャッジ時間 1,304 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,976 KB
testcase_01 AC 17 ms
7,896 KB
testcase_02 AC 17 ms
7,868 KB
testcase_03 AC 16 ms
7,812 KB
testcase_04 AC 16 ms
7,904 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 16 ms
7,900 KB
testcase_09 WA -
testcase_10 AC 16 ms
7,892 KB
testcase_11 AC 16 ms
7,928 KB
testcase_12 WA -
testcase_13 AC 17 ms
7,872 KB
testcase_14 AC 16 ms
7,872 KB
testcase_15 AC 17 ms
7,900 KB
testcase_16 AC 16 ms
7,904 KB
testcase_17 AC 16 ms
7,876 KB
testcase_18 WA -
testcase_19 AC 16 ms
7,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import ceil
N,M = map(int,input().split())
X,Y = map(int,input().split())

MX,MY = ceil(X/M),ceil(Y/M)
ans = "NO"

if MX%2 == MY%2 == 0:
  if X%M == Y%M:
    ans = "YES"
elif MX%2 != 0 and MY%2 != 0:
  if X%M == Y%M:
    ans = "YES"
else:
  if X%M+1 == Y%M:
    ans = "YES"

print(ans)
0