結果
| 問題 | No.1701 half price |
| コンテスト | |
| ユーザー |
harurun
|
| 提出日時 | 2021-10-02 02:05:42 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 409 bytes |
| 記録 | |
| コンパイル時間 | 402 ms |
| コンパイル使用メモリ | 84,736 KB |
| 実行使用メモリ | 81,408 KB |
| 最終ジャッジ日時 | 2026-04-03 12:27:09 |
| 合計ジャッジ時間 | 3,462 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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