結果
| 問題 | No.396 クラス替え |
| コンテスト | |
| ユーザー |
tookunn_1213
|
| 提出日時 | 2016-07-15 23:01:07 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 411 bytes |
| 記録 | |
| コンパイル時間 | 538 ms |
| コンパイル使用メモリ | 20,568 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-05-02 23:14:08 |
| 合計ジャッジ時間 | 4,233 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 WA * 3 |
ソースコード
N,M = map(int,input().split())
X,Y = map(int,input().split())
X,Y = X - 1,Y - 1
if X // M % 2 == 0 and Y // M % 2 == 0:
if X % M == Y % M:
print('YES')
else:
print('NO')
elif X // M % 2 == 0 and Y // M % 2 == 1:
if X % M == M - 1 - (Y % M):
print('YES')
else:
print('2NO')
elif X // M % 2 == 1 and Y // M % 2 == 0:
if M - 1 - (X % M) == Y % M:
print('YES')
else:
print('NO')
else:
print('NO')
tookunn_1213