{"problem":{"name":"Explore","description":{"content":"Takahashi is exploring a cave in a video game. The cave consists of $N$ rooms arranged in a row. The rooms are numbered Room $1,2,\\ldots,N$ from the entrance. Takahashi is initially in Room $1$, and t","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc265_b"},"statements":[{"statement_type":"Markdown","content":"Takahashi is exploring a cave in a video game.\nThe cave consists of $N$ rooms arranged in a row. The rooms are numbered Room $1,2,\\ldots,N$ from the entrance.\nTakahashi is initially in Room $1$, and the **time limit** is $T$.  \nFor each $1 \\leq i \\leq N-1$, he may consume a time of $A_i$ to move from Room $i$ to Room $(i+1)$. There is no other way to move between rooms. He cannot make a move that makes the time limit $0$ or less.\nThere are $M$ bonus rooms in the cave. The $i$\\-th bonus room is Room $X_i$; when he arrives at the room, the time limit increases by $Y_i$.\nCan Takahashi reach Room $N$?\n\n## Constraints\n\n*   $2 \\leq N \\leq 10^5$\n*   $0 \\leq M \\leq N-2$\n*   $1 \\leq T \\leq 10^9$\n*   $1 \\leq A_i \\leq 10^9$\n*   $1 < X_1 < \\ldots < X_M < N$\n*   $1 \\leq Y_i \\leq 10^9$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $M$ $T$\n$A_1$ $A_2$ $\\ldots$ $A_{N-1}$\n$X_1$ $Y_1$\n$X_2$ $Y_2$\n$\\vdots$\n$X_M$ $Y_M$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc265_b","tags":[],"sample_group":[["4 1 10\n5 7 5\n2 10","Yes\n\n*   Takahashi is initially in Room $1$, and the time limit is $10$.\n*   He consumes a time of $5$ to move to Room $2$. Now the time limit is $5$. Then, the time limit increases by $10$; it is now $15$.\n*   He consumes a time of $7$ to move to Room $3$. Now the time limit is $8$.\n*   He consumes a time of $5$ to move to Room $4$. Now the time limit is $3$."],["4 1 10\n10 7 5\n2 10","No\n\nHe cannot move from Room $1$ to Room $2$."]],"created_at":"2026-03-03 11:01:14"}}