結果

問題 No.1015 おつりは要らないです
ユーザー とろちゃとろちゃ
提出日時 2023-10-08 19:59:18
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 1,173 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 87,148 KB
実行使用メモリ 97,148 KB
最終ジャッジ日時 2023-10-08 19:59:24
合計ジャッジ時間 5,680 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
72,624 KB
testcase_01 AC 92 ms
72,624 KB
testcase_02 AC 97 ms
72,620 KB
testcase_03 AC 92 ms
72,416 KB
testcase_04 AC 93 ms
72,228 KB
testcase_05 AC 93 ms
72,428 KB
testcase_06 AC 100 ms
72,368 KB
testcase_07 AC 94 ms
72,044 KB
testcase_08 AC 92 ms
72,608 KB
testcase_09 AC 91 ms
72,336 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

# import pypyjit;pypyjit.set_param("max_unroll_recursion=-1")
# from bisect import *
# from collections import *
from heapq import *

# from itertools import *
# from sortedcontainers import *
# from math import lcm
# from datetime import *
# from decimal import *  # PyPyだと遅い
# from string import ascii_lowercase, ascii_uppercase
# import numpy as np
# from atcoder.dsu import *
# from atcoder.lazysegtree import *
# from atcoder.segtree import *
# from sortedcontainers import *
from random import *
import sys
import os

is_AtC = os.getenv("ATCODER", 0)
# sys.setrecursionlimit(10**6) # PyPyは呪文を付ける
INF = 1 << 61
MOD = 998244353
MOD = 10**9 + 7
File = sys.stdin


def input():
    return File.readline()[:-1]


# ///////////////////////////////////////////////////////////////////////////


N, X, Y, Z = map(int, input().split())
A = list(map(lambda x: -int(x) - 1, input().split()))

heapify(A)


def operation(num, p):
    while A and num:
        pop = -heappop(A)
        if pop > p:
            heappush(A, -pop + p)
        num -= 1


operation(Z, 10000)
operation(Y, 5000)
operation(X, 1000)
if not A:
    print("Yes")
else:
    print("No")
0