結果
| 問題 | No.1701 half price |
| コンテスト | |
| ユーザー |
neko_the_shadow
|
| 提出日時 | 2021-10-10 01:18:56 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 355 bytes |
| 記録 | |
| コンパイル時間 | 250 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 80,796 KB |
| 最終ジャッジ日時 | 2026-04-04 06:11:14 |
| 合計ジャッジ時間 | 2,729 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 16 WA * 4 |
ソースコード
n, w = map(int, input().split())
a = list(map(int, input().split()))
ans = set()
for bit in range(3**n):
x = bit
total = 0
key = 0
for i in range(n):
y = x % 3
x //= 3
if y == 1: total += a[i]
if y == 2: total += a[i] // 2
if y != 0: key |= (1 << i)
if total == w: ans.add(key)
print(len(ans))
neko_the_shadow