結果

問題 No.1701 half price
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-10-08 22:03:34
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 427 bytes
コンパイル時間 378 ms
コンパイル使用メモリ 86,448 KB
実行使用メモリ 77,824 KB
最終ジャッジ日時 2023-09-30 10:13:13
合計ジャッジ時間 5,247 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
70,880 KB
testcase_01 AC 96 ms
75,968 KB
testcase_02 AC 126 ms
76,376 KB
testcase_03 AC 78 ms
75,920 KB
testcase_04 AC 125 ms
76,368 KB
testcase_05 AC 88 ms
75,532 KB
testcase_06 AC 578 ms
76,460 KB
testcase_07 AC 580 ms
76,380 KB
testcase_08 WA -
testcase_09 AC 80 ms
75,804 KB
testcase_10 AC 77 ms
70,988 KB
testcase_11 AC 82 ms
75,732 KB
testcase_12 AC 80 ms
75,800 KB
testcase_13 AC 77 ms
75,804 KB
testcase_14 AC 79 ms
75,880 KB
testcase_15 AC 80 ms
75,592 KB
testcase_16 AC 73 ms
70,756 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 75 ms
70,832 KB
testcase_21 AC 574 ms
76,624 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

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

print (len(ans))
0