結果
| 問題 | No.1701 half price |
| コンテスト | |
| ユーザー |
harurun
|
| 提出日時 | 2021-10-02 02:08:04 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 2,817 ms / 3,000 ms |
| + 92µs | |
| コード長 | 411 bytes |
| 記録 | |
| コンパイル時間 | 60 ms |
| コンパイル使用メモリ | 14,592 KB |
| 実行使用メモリ | 11,776 KB |
| 最終ジャッジ日時 | 2026-10-15 02:40:41 |
| 合計ジャッジ時間 | 14,983 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
def main():
N,W=map(int,input().split())
a=list(map(int,input().split()))
ans=set()
for i in range(1,pow(3,N)):
s=0
M=i
l=[]
for j in range(N):
if M%3==1:
s+=a[j]//2
l.append(1)
elif M%3==2:
s+=a[j]
l.append(1)
else:
l.append(0)
M//=3
if s==W:
ans.add("".join(map(str,l)))
print(len(ans))
return
main()
harurun