結果

問題 No.1083 余りの余り
ユーザー kohei2019kohei2019
提出日時 2022-07-25 23:07:07
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 263 bytes
コンパイル時間 437 ms
コンパイル使用メモリ 87,124 KB
実行使用メモリ 84,616 KB
最終ジャッジ日時 2023-09-22 09:51:17
合計ジャッジ時間 7,009 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 69 ms
71,536 KB
testcase_02 WA -
testcase_03 AC 72 ms
71,496 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 72 ms
71,508 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 73 ms
71,508 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 72 ms
71,068 KB
testcase_13 WA -
testcase_14 AC 72 ms
71,400 KB
testcase_15 AC 73 ms
71,460 KB
testcase_16 AC 73 ms
71,432 KB
testcase_17 AC 72 ms
71,396 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 90 ms
76,396 KB
testcase_22 AC 71 ms
71,388 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 425 ms
84,496 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 70 ms
71,468 KB
testcase_30 AC 70 ms
71,064 KB
testcase_31 AC 70 ms
71,476 KB
testcase_32 AC 71 ms
71,324 KB
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())
lsA = list(map(int,input().split()))
lsA.sort()
# bitDP?
dp = [0]*(2**N)
dp[0] = K

for j in range(N):
    for i in range(2**N):
        if (1<<j & i) == 0:
            dp[i|(1<<j)] = max(dp[i|(1<<j)],dp[i] % lsA[j])

print(dp[-1])
0