結果

問題 No.1083 余りの余り
ユーザー kohei2019kohei2019
提出日時 2022-07-25 23:04:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 252 bytes
コンパイル時間 333 ms
コンパイル使用メモリ 87,196 KB
実行使用メモリ 85,356 KB
最終ジャッジ日時 2023-09-22 09:46:58
合計ジャッジ時間 9,651 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
71,164 KB
testcase_01 AC 86 ms
71,260 KB
testcase_02 AC 88 ms
76,404 KB
testcase_03 AC 82 ms
71,236 KB
testcase_04 WA -
testcase_05 AC 205 ms
79,096 KB
testcase_06 AC 83 ms
71,364 KB
testcase_07 AC 93 ms
76,372 KB
testcase_08 AC 91 ms
76,384 KB
testcase_09 AC 83 ms
71,440 KB
testcase_10 AC 93 ms
76,648 KB
testcase_11 WA -
testcase_12 AC 83 ms
71,488 KB
testcase_13 AC 85 ms
71,264 KB
testcase_14 AC 85 ms
71,560 KB
testcase_15 AC 84 ms
71,272 KB
testcase_16 AC 84 ms
71,440 KB
testcase_17 AC 83 ms
71,160 KB
testcase_18 WA -
testcase_19 AC 206 ms
78,968 KB
testcase_20 AC 92 ms
76,532 KB
testcase_21 AC 102 ms
76,568 KB
testcase_22 AC 82 ms
71,400 KB
testcase_23 AC 629 ms
85,236 KB
testcase_24 AC 633 ms
85,216 KB
testcase_25 AC 628 ms
85,232 KB
testcase_26 AC 628 ms
85,356 KB
testcase_27 AC 90 ms
76,508 KB
testcase_28 WA -
testcase_29 AC 82 ms
71,560 KB
testcase_30 AC 81 ms
71,220 KB
testcase_31 AC 88 ms
71,172 KB
testcase_32 AC 83 ms
71,324 KB
testcase_33 AC 632 ms
85,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

print(dp[-1])
0