結果

問題 No.1829 Möbius Tunnelling
ユーザー ygd.ygd.
提出日時 2022-02-04 21:30:26
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 780 bytes
コンパイル時間 488 ms
コンパイル使用メモリ 87,100 KB
実行使用メモリ 71,664 KB
最終ジャッジ日時 2023-09-02 04:30:40
合計ジャッジ時間 3,837 ms
ジャッジサーバーID
(参考情報)
judge16 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,396 KB
testcase_01 AC 81 ms
71,404 KB
testcase_02 AC 78 ms
71,640 KB
testcase_03 AC 78 ms
71,568 KB
testcase_04 AC 79 ms
71,436 KB
testcase_05 AC 79 ms
71,336 KB
testcase_06 AC 75 ms
71,664 KB
testcase_07 AC 78 ms
71,408 KB
testcase_08 AC 73 ms
71,428 KB
testcase_09 AC 77 ms
71,284 KB
testcase_10 AC 76 ms
71,144 KB
testcase_11 AC 75 ms
71,372 KB
testcase_12 AC 74 ms
71,404 KB
testcase_13 AC 82 ms
71,476 KB
testcase_14 AC 76 ms
71,316 KB
testcase_15 AC 74 ms
71,572 KB
testcase_16 AC 72 ms
71,504 KB
testcase_17 AC 82 ms
71,448 KB
testcase_18 AC 74 ms
71,636 KB
testcase_19 AC 74 ms
71,144 KB
testcase_20 AC 77 ms
71,384 KB
testcase_21 AC 75 ms
71,432 KB
testcase_22 AC 74 ms
71,396 KB
testcase_23 AC 77 ms
71,532 KB
testcase_24 AC 79 ms
71,444 KB
testcase_25 AC 74 ms
71,280 KB
testcase_26 AC 74 ms
71,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
#input = sys.stdin.readline #文字列につけてはダメ
input = sys.stdin.buffer.readline #文字列につけてはダメ
#sys.setrecursionlimit(1000000)
#import bisect
#import itertools
#import random
#from heapq import heapify, heappop, heappush
#from collections import defaultdict 
#from collections import deque
#import copy
#import math
#from functools import lru_cache
#@lru_cache(maxsize=None)
#MOD = pow(10,9) + 7
#MOD = 998244353
#dx = [1,0,-1,0]
#dy = [0,1,0,-1]


def main():
    N = int(input())
    a,b,c = map(int,input().split())
    c += N
    a-=1; b-=1; c -= 1
    if a <= c <= a+N-1 and b < a:
        print('Yes')
    elif a + N+1 <= c < 2*N and a < b:
        print('Yes')
    else:
        print('No')



if __name__ == '__main__':
    main()
0