Submission #34218250


Source Code Expand

n, m, t = list(map(int, input().strip().split()))
A = list(map(int, input().strip().split()))
# A: 0~n-2
B = [0] * (10**5*2)
for i in range(m):
    x, y = list(map(int, input().strip().split()))
    B[x] = y
for i in range(1, n):
    if t - A[i-1] <= 0:
        print("No")
        exit(0)
    t += B[i+1] - A[i-1]
print("Yes")

Submission Info

Submission Time
Task B - Explore
User luhouxi
Language PyPy3 (7.3.0)
Score 200
Code Size 339 Byte
Status AC
Exec Time 217 ms
Memory 86692 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 26
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All hand_01.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, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, random_21.txt, random_22.txt, random_23.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
hand_01.txt AC 63 ms 63128 KiB
random_01.txt AC 217 ms 86624 KiB
random_02.txt AC 116 ms 77736 KiB
random_03.txt AC 207 ms 86692 KiB
random_04.txt AC 98 ms 75736 KiB
random_05.txt AC 205 ms 86392 KiB
random_06.txt AC 119 ms 78152 KiB
random_07.txt AC 211 ms 86492 KiB
random_08.txt AC 152 ms 80948 KiB
random_09.txt AC 204 ms 86576 KiB
random_10.txt AC 147 ms 80164 KiB
random_11.txt AC 203 ms 86592 KiB
random_12.txt AC 122 ms 78940 KiB
random_13.txt AC 208 ms 86400 KiB
random_14.txt AC 141 ms 80492 KiB
random_15.txt AC 209 ms 86576 KiB
random_16.txt AC 141 ms 80284 KiB
random_17.txt AC 205 ms 86592 KiB
random_18.txt AC 203 ms 86244 KiB
random_19.txt AC 206 ms 86408 KiB
random_20.txt AC 152 ms 81104 KiB
random_21.txt AC 48 ms 63236 KiB
random_22.txt AC 48 ms 63248 KiB
random_23.txt AC 49 ms 63220 KiB
sample_01.txt AC 50 ms 63352 KiB
sample_02.txt AC 53 ms 63336 KiB