結果

問題 No.396 クラス替え
ユーザー 👑 KazunKazun
提出日時 2020-08-31 14:44:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 34 ms / 1,000 ms
コード長 209 bytes
コンパイル時間 594 ms
コンパイル使用メモリ 82,368 KB
実行使用メモリ 53,616 KB
最終ジャッジ日時 2024-04-27 18:36:51
合計ジャッジ時間 2,386 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
53,004 KB
testcase_01 AC 32 ms
52,816 KB
testcase_02 AC 32 ms
53,504 KB
testcase_03 AC 34 ms
53,256 KB
testcase_04 AC 31 ms
52,208 KB
testcase_05 AC 31 ms
52,908 KB
testcase_06 AC 30 ms
52,644 KB
testcase_07 AC 32 ms
52,244 KB
testcase_08 AC 32 ms
53,360 KB
testcase_09 AC 32 ms
52,360 KB
testcase_10 AC 30 ms
52,688 KB
testcase_11 AC 31 ms
52,948 KB
testcase_12 AC 32 ms
53,052 KB
testcase_13 AC 31 ms
53,084 KB
testcase_14 AC 31 ms
53,616 KB
testcase_15 AC 31 ms
51,836 KB
testcase_16 AC 31 ms
52,492 KB
testcase_17 AC 32 ms
52,960 KB
testcase_18 AC 31 ms
51,944 KB
testcase_19 AC 33 ms
52,924 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

alpha=(X-1)%(2*M)
beta=(Y-1)%(2*M)

alpha=min(alpha,(2*M-1)-alpha)
beta=min(beta,(2*M-1)-beta)

if alpha==beta:
    print("YES")
else:
    print("NO")
0