結果
問題 | No.2155 みちらcolor |
ユーザー |
|
提出日時 | 2022-12-09 21:57:11 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 462 bytes |
コンパイル時間 | 447 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 11,392 KB |
最終ジャッジ日時 | 2024-10-14 21:51:40 |
合計ジャッジ時間 | 5,571 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 64 |
ソースコード
n,m,l=map(int,input().split()) a=list(map(int,input().split())) memo=[None]*102 for i in range(102): row = list() row.append(-1) memo[i] = row*1002 def dp(i,x): if(memo[i][x]>=0): return memo[i][x] if i==n: if x==m: memo[i][x]=1 else: memo[i][x]=0 return memo[i][x] nx = (x+a[i])//2 ans = dp(i+1,nx) + dp(i+1,x) memo[i][x]= min(ans,1) return memo[i][x] print(dp(0,l))