Submission #18730769


Source Code Expand

N, M, T = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(M)]
bat = N
time = 0
for a, b in AB:
    if a - time >= bat:
        print('No')
        break
    bat = bat - a + time
    bat += b-a
    if bat > N:
        bat = N
    time = b

else:
    if T - time >= bat:
        print('No')
    else:
        print('Yes')

Submission Info

Submission Time
Task B - Smartphone Addiction
User noyan
Language Python (3.8.2)
Score 200
Code Size 370 Byte
Status AC
Exec Time 29 ms
Memory 9320 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 5
AC × 21
Set Name Test Cases
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
Case Name Status Exec Time Memory
handmade_00.txt AC 19 ms 9044 KiB
handmade_01.txt AC 19 ms 8992 KiB
random_00.txt AC 24 ms 9036 KiB
random_01.txt AC 25 ms 9320 KiB
random_02.txt AC 21 ms 9320 KiB
random_03.txt AC 29 ms 9184 KiB
random_04.txt AC 19 ms 9200 KiB
random_05.txt AC 19 ms 8876 KiB
random_06.txt AC 23 ms 8992 KiB
random_07.txt AC 25 ms 8992 KiB
random_08.txt AC 21 ms 9124 KiB
random_09.txt AC 29 ms 9172 KiB
random_10.txt AC 22 ms 8996 KiB
random_11.txt AC 23 ms 9160 KiB
random_12.txt AC 24 ms 9260 KiB
random_13.txt AC 21 ms 9000 KiB
sample_01.txt AC 20 ms 8884 KiB
sample_02.txt AC 22 ms 9044 KiB
sample_03.txt AC 21 ms 9040 KiB
sample_04.txt AC 20 ms 9116 KiB
sample_05.txt AC 28 ms 8984 KiB