結果

問題 No.1736 Princess vs. Dragoness
ユーザー shika_126shika_126
提出日時 2022-03-23 19:03:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 769 ms / 2,000 ms
コード長 561 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,136 KB
最終ジャッジ日時 2024-04-20 03:18:57
合計ジャッジ時間 7,112 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,752 KB
testcase_01 AC 24 ms
10,752 KB
testcase_02 AC 24 ms
10,624 KB
testcase_03 AC 48 ms
10,752 KB
testcase_04 AC 152 ms
11,008 KB
testcase_05 AC 27 ms
10,752 KB
testcase_06 AC 127 ms
11,008 KB
testcase_07 AC 554 ms
11,008 KB
testcase_08 AC 200 ms
10,880 KB
testcase_09 AC 408 ms
11,008 KB
testcase_10 AC 25 ms
10,752 KB
testcase_11 AC 769 ms
11,008 KB
testcase_12 AC 152 ms
10,880 KB
testcase_13 AC 144 ms
11,008 KB
testcase_14 AC 345 ms
11,008 KB
testcase_15 AC 43 ms
10,880 KB
testcase_16 AC 72 ms
10,752 KB
testcase_17 AC 265 ms
11,008 KB
testcase_18 AC 115 ms
11,008 KB
testcase_19 AC 121 ms
10,880 KB
testcase_20 AC 43 ms
10,752 KB
testcase_21 AC 261 ms
10,880 KB
testcase_22 AC 396 ms
11,136 KB
testcase_23 AC 80 ms
11,136 KB
testcase_24 AC 31 ms
10,752 KB
testcase_25 AC 82 ms
10,752 KB
testcase_26 AC 141 ms
10,880 KB
testcase_27 AC 103 ms
11,008 KB
testcase_28 AC 67 ms
11,008 KB
testcase_29 AC 61 ms
11,136 KB
testcase_30 AC 179 ms
11,008 KB
testcase_31 AC 151 ms
11,008 KB
testcase_32 AC 157 ms
10,880 KB
testcase_33 AC 24 ms
10,880 KB
testcase_34 AC 24 ms
10,880 KB
testcase_35 AC 23 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,a,b,x,y = map(int,input().split())
l = sorted(map(int,input().split()))[::-1]
for i in range(a):
    for j ,k in enumerate(l):
        if k >= x:
            l[j] -= x
            break
    else:
        for j ,k in enumerate(l):
            l[j] -= x
            break
    l = [t for t in l if t > 0]
for i in range(b):
    p = y*1
    for  j ,k in enumerate(l):
        if k >= p:
            l[j] -= p
            break
        else:
            l[j] = 0
            p -= k
    l = [t for t in l if t > 0]
if l == []:
    print('Yes')
else:
    print('No')
0