結果
| 問題 |
No.1701 half price
|
| コンテスト | |
| ユーザー |
harurun
|
| 提出日時 | 2021-10-02 02:05:42 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 409 bytes |
| コンパイル時間 | 838 ms |
| コンパイル使用メモリ | 82,364 KB |
| 実行使用メモリ | 76,412 KB |
| 最終ジャッジ日時 | 2024-07-23 03:46:12 |
| 合計ジャッジ時間 | 4,541 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 16 WA * 4 |
ソースコード
def main():
N,W=map(int,input().split())
a=list(map(int,input().split()))
ans=set()
for i in range(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