結果
| 問題 |
No.1701 half price
|
| コンテスト | |
| ユーザー |
yassu0320
|
| 提出日時 | 2021-11-05 00:10:44 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 957 bytes |
| コンパイル時間 | 343 ms |
| コンパイル使用メモリ | 82,444 KB |
| 実行使用メモリ | 84,448 KB |
| 最終ジャッジ日時 | 2024-10-15 06:44:20 |
| 合計ジャッジ時間 | 5,716 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 16 WA * 4 |
ソースコード
#!/usr/bin/env python3
from pprint import pprint
from sys import setrecursionlimit, stdin
from typing import Dict, Iterable, Set
INF: int = 1 << 62
setrecursionlimit(1_000_000)
def inputs(type_=int):
ins = input().split(' ')
ins = [x for x in ins if x != '']
if isinstance(type_, Iterable):
return [t(x) for t, x in zip(type_, ins)]
else:
return list(map(type_, ins))
def input_(type_=int):
a, = inputs(type_)
return a
inputi = input_
def inputstr():
return input_(str)
def answer(res) -> None:
print(res)
exit()
# start coding
n, w = inputs()
A = inputs()
from itertools import product
set_ = set()
for it in product(range(3), repeat=n):
s = 0
t = []
for i, f in enumerate(it):
if f == 1:
s += A[i] // 2
t.append(i)
elif f == 2:
s += A[i]
t.append(i)
if s == w:
set_.add(tuple(t))
print(len(set_))
yassu0320