結果
問題 |
No.10 +か×か
|
ユーザー |
|
提出日時 | 2022-11-28 08:52:39 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 732 bytes |
コンパイル時間 | 248 ms |
コンパイル使用メモリ | 81,920 KB |
実行使用メモリ | 253,460 KB |
最終ジャッジ日時 | 2024-10-05 05:18:10 |
合計ジャッジ時間 | 5,891 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 WA * 9 |
ソースコード
# import pypyjit # pypyjit.set_param('max_unroll_recursion=-1') from collections import * from functools import * from itertools import * from heapq import * import sys,math input = sys.stdin.readline N = int(input()) T = int(input()) A = list(map(int,input().split())) val = [False]*(100005) X = defaultdict(lambda:'') M = 10**5+5 val[A[0]]=True for i in range(N-1): called = [False]*(10**5+5) a = A[i+1] for j in range(M-1-a,-1,-1): if val[j]: val[j+a]=True called[j+a]=True X[j+a] = X[j]+'+' for j in range(M-1,-1,-1): if called[j]: continue if j*a>=M: continue val[j*a]=True X[j*a] = X[j]+'*' print(X[T])