結果

問題 No.1015 おつりは要らないです
ユーザー rei60rei60
提出日時 2020-04-04 10:10:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 712 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 10,912 KB
実行使用メモリ 19,068 KB
最終ジャッジ日時 2023-09-16 05:28:24
合計ジャッジ時間 5,335 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,864 KB
testcase_01 AC 16 ms
7,868 KB
testcase_02 AC 15 ms
7,832 KB
testcase_03 AC 17 ms
7,776 KB
testcase_04 AC 17 ms
7,752 KB
testcase_05 AC 16 ms
7,932 KB
testcase_06 AC 16 ms
7,844 KB
testcase_07 AC 16 ms
7,944 KB
testcase_08 AC 16 ms
7,764 KB
testcase_09 AC 16 ms
7,768 KB
testcase_10 AC 151 ms
18,568 KB
testcase_11 AC 153 ms
18,768 KB
testcase_12 AC 147 ms
18,308 KB
testcase_13 AC 151 ms
18,664 KB
testcase_14 AC 163 ms
19,068 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 123 ms
18,668 KB
testcase_21 AC 124 ms
18,644 KB
testcase_22 AC 121 ms
18,652 KB
testcase_23 AC 122 ms
18,212 KB
testcase_24 AC 124 ms
18,740 KB
testcase_25 AC 121 ms
18,576 KB
testcase_26 AC 122 ms
18,684 KB
testcase_27 AC 119 ms
18,604 KB
testcase_28 AC 119 ms
18,412 KB
testcase_29 AC 122 ms
18,696 KB
testcase_30 AC 16 ms
7,864 KB
testcase_31 AC 58 ms
10,384 KB
testcase_32 AC 56 ms
10,296 KB
testcase_33 AC 116 ms
18,864 KB
testcase_34 AC 15 ms
7,872 KB
testcase_35 AC 16 ms
7,756 KB
testcase_36 AC 16 ms
7,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, X, Y, Z = map(int,input().split())
A = list(map(int,input().split())) 
B = []
C = []
for i in A:   
    if i >= 10000:
        temp = i//10000
        if Z >= temp:
            B.append(i - temp*10000)
            Z -= temp
        else:
            B.append(i)
    else:
        B.append(i)
B.sort(reverse = True)

if Z >= 0:
        B = B[Z:]

for i in B:   
    if i >= 5000:
        temp = i//5000
        if Y >= temp:
            C.append(i - temp*5000)
            Y -= temp
        else:
            C.append(i)
    else:
        C.append(i)
C.sort(reverse = True)

if Y >= 0:
        C = C[Y:]

for i in C:
    X -= i//1000 + 1

if X >= 0 and Y >= 0 and Z >= 0:
    print("Yes")
else:
    print("No")
0