結果
問題 |
No.1083 余りの余り
|
ユーザー |
![]() |
提出日時 | 2020-06-19 22:29:09 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 259 bytes |
コンパイル時間 | 83 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 38,380 KB |
最終ジャッジ日時 | 2024-07-03 15:03:57 |
合計ジャッジ時間 | 7,912 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 15 TLE * 1 -- * 15 |
ソースコード
import sys,heapq input = sys.stdin.buffer.readline n,k=map(int,input().split()) A=[int(i) for i in input().split()] DP=[0]*(2**n) DP[0]=k for i in range(2**n): for j in range(n): if not i&(1<<j): DP[i|(1<<j)]=max(DP[i|(1<<j)],DP[i]%A[j]) print(DP)