Submission #34112234


Source Code Expand

N,M,T=map(int,input().split())
A=[0]+list(map(int,input().split()))
bonus=[0]*(N+1)
for _ in range(M):
  x,y=map(int,input().split())
  bonus[x]=y

# i -> i+1
for i in range(1,N):
  if T<=A[i]:
    print("No")
    exit()
  T-=A[i]
  T+=bonus[i+1]

print("Yes")

Submission Info

Submission Time
Task B - Explore
User kyopro_friends
Language Python (3.8.2)
Score 200
Code Size 275 Byte
Status AC
Exec Time 240 ms
Memory 19768 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 18 ms 8836 KiB
random_01.txt AC 209 ms 19748 KiB
random_02.txt AC 66 ms 11128 KiB
random_03.txt AC 207 ms 19744 KiB
random_04.txt AC 43 ms 9736 KiB
random_05.txt AC 212 ms 19608 KiB
random_06.txt AC 79 ms 11576 KiB
random_07.txt AC 228 ms 19628 KiB
random_08.txt AC 123 ms 14356 KiB
random_09.txt AC 234 ms 19628 KiB
random_10.txt AC 121 ms 13984 KiB
random_11.txt AC 235 ms 19768 KiB
random_12.txt AC 84 ms 12024 KiB
random_13.txt AC 238 ms 19640 KiB
random_14.txt AC 115 ms 13416 KiB
random_15.txt AC 237 ms 19608 KiB
random_16.txt AC 122 ms 13620 KiB
random_17.txt AC 232 ms 19644 KiB
random_18.txt AC 228 ms 19324 KiB
random_19.txt AC 240 ms 19584 KiB
random_20.txt AC 135 ms 14544 KiB
random_21.txt AC 18 ms 8796 KiB
random_22.txt AC 22 ms 8924 KiB
random_23.txt AC 21 ms 8832 KiB
sample_01.txt AC 20 ms 8852 KiB
sample_02.txt AC 18 ms 8952 KiB