結果
| 問題 | No.1701 half price |
| コンテスト | |
| ユーザー |
wgrape
|
| 提出日時 | 2024-11-11 11:08:50 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 277 ms / 3,000 ms |
| + 793µs | |
| コード長 | 437 bytes |
| 記録 | |
| コンパイル時間 | 124 ms |
| コンパイル使用メモリ | 64,744 KB |
| 実行使用メモリ | 58,732 KB |
| 最終ジャッジ日時 | 2026-10-15 02:52:40 |
| 合計ジャッジ時間 | 3,789 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
N,W = map(int,input().split())
A = list(map(int,input().split()))
ans = set()
for status in range(1, 3 ** N):
i = 0
val = 0
cond = 0
while status:
if status % 3 == 2:
val += A[i]
cond |= (1 << i)
elif status % 3 == 1:
val += A[i] // 2
cond |= (1 << i)
status //= 3
i += 1
if val == W:
ans.add(cond)
print(len(ans))
wgrape