結果
| 問題 |
No.2344 (l+r)^2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-09 21:42:47 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 315 bytes |
| コンパイル時間 | 247 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 377,392 KB |
| 最終ジャッジ日時 | 2025-01-02 02:39:21 |
| 合計ジャッジ時間 | 35,829 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 1 TLE * 11 |
ソースコード
import sys
sys.setrecursionlimit(10**8)
def f(i,j):
if (i,j) not in d:
d[(i,j)]=(f(i-1,j)+f(i-1,j+1))**2 % mod
return d[(i,j)]
T=int(input())
for _ in range(T):
n,m=map(int,input().split())
mod=2**m
L=list(map(int,input().split()))
d=dict()
for j in range(n):
d[(0,j)]=L[j]
print(f(n-1,0))