提出 #34209923


ソースコード 拡げる

#!/usr/bin/env python3
import collections


def main():
    N, M, T = map(int, input().split())
    A = list(map(int, input().split()))
    bonus = collections.defaultdict(int)
    for _ in range(M):
        x, y = map(int, input().split())
        bonus[x - 1] = y

    for i in range(N - 1):
        T -= A[i]
        if T <= 0:
            print("No")
            return
        T += bonus[i + 1]

    print("Yes")


if __name__ == "__main__":
    main()

提出情報

提出日時
問題 B - Explore
ユーザ rainline
言語 PyPy3 (7.3.0)
得点 200
コード長 458 Byte
結果 AC
実行時間 230 ms
メモリ 96464 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 2
AC × 26
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
hand_01.txt AC 68 ms 64676 KiB
random_01.txt AC 223 ms 96464 KiB
random_02.txt AC 117 ms 79528 KiB
random_03.txt AC 222 ms 96156 KiB
random_04.txt AC 100 ms 75252 KiB
random_05.txt AC 226 ms 95444 KiB
random_06.txt AC 126 ms 79716 KiB
random_07.txt AC 219 ms 95784 KiB
random_08.txt AC 162 ms 85580 KiB
random_09.txt AC 222 ms 95468 KiB
random_10.txt AC 155 ms 84420 KiB
random_11.txt AC 225 ms 95780 KiB
random_12.txt AC 134 ms 80316 KiB
random_13.txt AC 222 ms 95684 KiB
random_14.txt AC 144 ms 82492 KiB
random_15.txt AC 226 ms 95788 KiB
random_16.txt AC 153 ms 83688 KiB
random_17.txt AC 225 ms 95668 KiB
random_18.txt AC 227 ms 96072 KiB
random_19.txt AC 230 ms 95776 KiB
random_20.txt AC 164 ms 85564 KiB
random_21.txt AC 56 ms 64832 KiB
random_22.txt AC 59 ms 65072 KiB
random_23.txt AC 52 ms 64568 KiB
sample_01.txt AC 59 ms 64724 KiB
sample_02.txt AC 55 ms 64816 KiB