結果
| 問題 |
No.396 クラス替え
|
| コンテスト | |
| ユーザー |
adoth
|
| 提出日時 | 2017-11-14 13:56:45 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 437 bytes |
| コンパイル時間 | 73 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-25 02:03:01 |
| 合計ジャッジ時間 | 1,339 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 WA * 3 |
ソースコード
# https://yukicoder.me/problems/no/396
def select_class(class_M, rank):
ans = rank % (2 * class_M)
if ans > class_M:
return ans - (2 * (ans - class_M) - 1)
else:
return ans
def main():
N, M = map(int, input().split())
X, Y = map(int, input().split())
hanako = select_class(M, X)
taro = select_class(M, Y)
if hanako == taro:
print("YES")
else:
print("NO")
main()
adoth