提出 #18730187


ソースコード 拡げる

import sys


def IN_I(): return int(sys.stdin.readline().rstrip())
def IN_LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def IN_S(): return sys.stdin.readline().rstrip()
def IN_LS(): return list(sys.stdin.readline().rstrip().split())
INF = float('inf')
MOD = 10**9 + 7


N, M, T = IN_LI()

now_t = 0
now_n = N
for i in range(M):
    a, b = IN_LI()
    now_n -= (a - now_t)
    if now_n <= 0:
        print('No')
        exit()
    now_n = min(N, now_n + (b - a))
    now_t = b
now_n -= (T - b)
if now_n <= 0:
    print('No')
else:
    print('Yes')

提出情報

提出日時
問題 B - Smartphone Addiction
ユーザ okayuki
言語 PyPy3 (7.3.0)
得点 200
コード長 596 Byte
結果 AC
実行時間 92 ms
メモリ 67644 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 5
AC × 21
セット名 テストケース
Sample sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_05.txt
All handmade_00.txt, handmade_01.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_05.txt
ケース名 結果 実行時間 メモリ
handmade_00.txt AC 92 ms 61776 KiB
handmade_01.txt AC 53 ms 61816 KiB
random_00.txt AC 67 ms 67644 KiB
random_01.txt AC 64 ms 67356 KiB
random_02.txt AC 55 ms 64508 KiB
random_03.txt AC 63 ms 67504 KiB
random_04.txt AC 50 ms 61792 KiB
random_05.txt AC 54 ms 61840 KiB
random_06.txt AC 53 ms 61588 KiB
random_07.txt AC 54 ms 61864 KiB
random_08.txt AC 50 ms 61664 KiB
random_09.txt AC 51 ms 62460 KiB
random_10.txt AC 48 ms 62516 KiB
random_11.txt AC 60 ms 67620 KiB
random_12.txt AC 64 ms 67544 KiB
random_13.txt AC 62 ms 67560 KiB
sample_01.txt AC 53 ms 61848 KiB
sample_02.txt AC 53 ms 61912 KiB
sample_03.txt AC 48 ms 61864 KiB
sample_04.txt AC 52 ms 61800 KiB
sample_05.txt AC 50 ms 61772 KiB