結果
問題 | No.1083 余りの余り |
ユーザー | mkawa2 |
提出日時 | 2021-06-04 15:46:54 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 922 bytes |
コンパイル時間 | 211 ms |
コンパイル使用メモリ | 10,920 KB |
実行使用メモリ | 33,108 KB |
最終ジャッジ日時 | 2023-08-12 04:13:12 |
合計ジャッジ時間 | 8,484 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 17 ms
7,752 KB |
testcase_01 | AC | 15 ms
7,752 KB |
testcase_02 | AC | 16 ms
7,756 KB |
testcase_03 | AC | 15 ms
7,760 KB |
testcase_04 | WA | - |
testcase_05 | AC | 2,091 ms
18,424 KB |
testcase_06 | AC | 15 ms
7,840 KB |
testcase_07 | AC | 16 ms
7,936 KB |
testcase_08 | AC | 17 ms
7,784 KB |
testcase_09 | AC | 15 ms
7,808 KB |
testcase_10 | AC | 16 ms
7,696 KB |
testcase_11 | WA | - |
testcase_12 | AC | 16 ms
7,820 KB |
testcase_13 | AC | 16 ms
7,736 KB |
testcase_14 | AC | 15 ms
7,752 KB |
testcase_15 | AC | 15 ms
7,904 KB |
testcase_16 | AC | 15 ms
7,816 KB |
testcase_17 | AC | 16 ms
7,780 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])