結果
問題 |
No.396 クラス替え
|
ユーザー |
|
提出日時 | 2017-03-25 06:15:45 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 524 bytes |
コンパイル時間 | 190 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-06 04:08:04 |
合計ジャッジ時間 | 1,440 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 WA * 3 |
ソースコード
from sys import stdin def solve(): n, m = map(int, input().split()) x, y = map(int, input().split()) x, y = x - 1, y - 1 ans = 'YES' if furiwake(m, x) == furiwake(m, y) else 'NO' print(ans) def furiwake(m, x): if x // m: return m - 1 - (x % m) else: return x % m def debug(x, table): for name, val in table.items(): if x is val: print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr) return None if __name__ == '__main__': solve()