結果
問題 | No.1083 余りの余り |
ユーザー | mkawa2 |
提出日時 | 2021-06-04 15:46:54 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 922 bytes |
コンパイル時間 | 154 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 36,736 KB |
最終ジャッジ日時 | 2024-04-29 18:44:46 |
合計ジャッジ時間 | 7,916 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 29 ms
16,000 KB |
testcase_01 | AC | 28 ms
10,496 KB |
testcase_02 | AC | 28 ms
10,368 KB |
testcase_03 | AC | 27 ms
10,624 KB |
testcase_04 | WA | - |
testcase_05 | AC | 2,393 ms
20,864 KB |
testcase_06 | AC | 28 ms
10,624 KB |
testcase_07 | AC | 30 ms
10,624 KB |
testcase_08 | AC | 28 ms
10,624 KB |
testcase_09 | AC | 27 ms
10,624 KB |
testcase_10 | AC | 29 ms
10,624 KB |
testcase_11 | WA | - |
testcase_12 | AC | 29 ms
10,624 KB |
testcase_13 | AC | 29 ms
10,496 KB |
testcase_14 | AC | 27 ms
10,624 KB |
testcase_15 | AC | 28 ms
10,624 KB |
testcase_16 | AC | 28 ms
10,496 KB |
testcase_17 | AC | 29 ms
10,496 KB |
testcase_18 | TLE | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
ソースコード
import sys # sys.setrecursionlimit(200005) int1 = lambda x: int(x)-1 p2D = lambda x: print(*x, sep="\n") def II(): return int(sys.stdin.buffer.readline()) def LI(): return list(map(int, sys.stdin.buffer.readline().split())) def LI1(): return list(map(int1, sys.stdin.buffer.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] def LLI1(rows_number): return [LI1() for _ in range(rows_number)] def BI(): return sys.stdin.buffer.readline().rstrip() def SI(): return sys.stdin.buffer.readline().rstrip().decode() dij = [(0, 1), (-1, 0), (0, -1), (1, 0)] # dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)] inf = 10**16 # md = 998244353 # md = 10**9+7 n, k = LI() aa = LI() dp = [-1]*(1 << n) dp[0] = k for bit in range(1 << n): for i in range(n): if bit >> i & 1: continue dp[bit | 1 << i] = max(dp[bit | 1 << i], dp[bit]%aa[i]) print(dp[-1])