結果

問題 No.1083 余りの余り
ユーザー nephrologistnephrologist
提出日時 2020-06-19 21:47:05
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 273 bytes
コンパイル時間 286 ms
コンパイル使用メモリ 87,012 KB
実行使用メモリ 93,512 KB
最終ジャッジ日時 2023-09-16 13:50:29
合計ジャッジ時間 8,382 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,136 KB
testcase_01 AC 72 ms
71,340 KB
testcase_02 AC 79 ms
76,624 KB
testcase_03 AC 73 ms
70,892 KB
testcase_04 WA -
testcase_05 AC 207 ms
81,024 KB
testcase_06 AC 73 ms
71,368 KB
testcase_07 AC 78 ms
76,060 KB
testcase_08 AC 78 ms
76,520 KB
testcase_09 AC 72 ms
71,204 KB
testcase_10 AC 77 ms
76,616 KB
testcase_11 WA -
testcase_12 AC 71 ms
71,200 KB
testcase_13 AC 72 ms
71,232 KB
testcase_14 AC 70 ms
71,072 KB
testcase_15 AC 70 ms
71,064 KB
testcase_16 AC 71 ms
71,156 KB
testcase_17 AC 69 ms
71,336 KB
testcase_18 WA -
testcase_19 AC 208 ms
81,024 KB
testcase_20 AC 80 ms
76,468 KB
testcase_21 AC 90 ms
76,816 KB
testcase_22 AC 72 ms
71,232 KB
testcase_23 AC 699 ms
93,160 KB
testcase_24 AC 693 ms
93,384 KB
testcase_25 AC 698 ms
93,476 KB
testcase_26 AC 702 ms
93,484 KB
testcase_27 AC 79 ms
76,296 KB
testcase_28 WA -
testcase_29 AC 71 ms
71,152 KB
testcase_30 AC 70 ms
71,232 KB
testcase_31 AC 69 ms
70,884 KB
testcase_32 AC 70 ms
71,192 KB
testcase_33 AC 699 ms
93,212 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
A = list(map(int, input().split()))
dp = [-1] * (1 << n + 1)
dp[0] = k
for s in range(1 << n):
    for i in range(n):
        ns = s | 1 << i
        dp[ns] = max(dp[ns], dp[s] % A[i])
        # print(s, ns, dp[ns])
print(dp[(1 << n) - 1])
0