結果

問題 No.1701 half price
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-10-08 22:07:03
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 440 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 86,916 KB
実行使用メモリ 78,012 KB
最終ジャッジ日時 2023-09-30 10:20:17
合計ジャッジ時間 4,746 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,316 KB
testcase_01 AC 68 ms
76,480 KB
testcase_02 AC 120 ms
77,100 KB
testcase_03 AC 69 ms
76,208 KB
testcase_04 AC 117 ms
77,156 KB
testcase_05 AC 74 ms
76,516 KB
testcase_06 AC 622 ms
77,148 KB
testcase_07 AC 618 ms
77,204 KB
testcase_08 WA -
testcase_09 AC 69 ms
76,188 KB
testcase_10 AC 65 ms
71,188 KB
testcase_11 AC 67 ms
76,352 KB
testcase_12 AC 68 ms
76,136 KB
testcase_13 AC 69 ms
76,168 KB
testcase_14 AC 74 ms
76,264 KB
testcase_15 AC 69 ms
76,360 KB
testcase_16 AC 63 ms
71,396 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 62 ms
71,360 KB
testcase_21 AC 618 ms
77,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

"""
from sys import stdin
import sys

N,W = map(int,stdin.readline().split())

a = list(map(int,stdin.readline().split()))

ans = set()
for i in range(3**N):

    now = 0
    s = []
    for j in range(N):
        if i % 3 == 0:
            now += a[j]
        elif i % 3 == 1:
            now += a[j] // 2
        else:
            s.append(j)
        i //= 3

    s.sort()
    if now == W:
        ans.add(tuple(s))

print (len(ans))
0