結果

問題 No.1829 Möbius Tunnelling
ユーザー tnodino
提出日時 2022-02-04 21:37:18
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 402 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-11 11:34:35
合計ジャッジ時間 1,762 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

def Right(a, b, x):
    a += x
    b += x
    if a < N and a < b:
        return True
    else:
        return False

def Left(a, b, x):
    a -= x
    b -= x
    if 0 <= a and b < a:
        return True
    else:
        return False

N = int(input())
a,b,c = map(int,input().split())
a -= 1
b -= 1
c -= 1
R = N - c
L = c + 1
if Right(a, b, R) or Left(a, b, L):
    print('Yes')
else:
    print('No')
0