結果
問題 |
No.1083 余りの余り
|
ユーザー |
![]() |
提出日時 | 2020-06-19 22:29:22 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 259 bytes |
コンパイル時間 | 168 ms |
コンパイル使用メモリ | 82,012 KB |
実行使用メモリ | 119,668 KB |
最終ジャッジ日時 | 2024-07-03 15:04:08 |
合計ジャッジ時間 | 7,002 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 31 |
ソースコード
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)