結果
問題 | No.2071 Shift and OR |
ユーザー | taiga0629kyopro |
提出日時 | 2022-09-09 22:20:48 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 402 bytes |
コンパイル時間 | 492 ms |
コンパイル使用メモリ | 87,160 KB |
実行使用メモリ | 846,540 KB |
最終ジャッジ日時 | 2023-08-17 05:30:39 |
合計ジャッジ時間 | 7,974 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 118 ms
79,244 KB |
testcase_01 | AC | 126 ms
79,908 KB |
testcase_02 | AC | 148 ms
81,144 KB |
testcase_03 | AC | 169 ms
82,276 KB |
testcase_04 | AC | 157 ms
81,656 KB |
testcase_05 | AC | 199 ms
83,956 KB |
testcase_06 | AC | 159 ms
81,620 KB |
testcase_07 | AC | 148 ms
81,136 KB |
testcase_08 | AC | 158 ms
81,516 KB |
testcase_09 | AC | 158 ms
81,640 KB |
testcase_10 | AC | 158 ms
81,672 KB |
testcase_11 | AC | 210 ms
84,248 KB |
testcase_12 | AC | 210 ms
84,284 KB |
testcase_13 | AC | 201 ms
83,924 KB |
testcase_14 | AC | 103 ms
78,612 KB |
testcase_15 | AC | 178 ms
82,728 KB |
testcase_16 | AC | 178 ms
82,924 KB |
testcase_17 | AC | 211 ms
84,092 KB |
testcase_18 | AC | 126 ms
79,884 KB |
testcase_19 | AC | 219 ms
84,856 KB |
testcase_20 | AC | 217 ms
84,716 KB |
testcase_21 | AC | 247 ms
86,460 KB |
testcase_22 | AC | 228 ms
85,284 KB |
testcase_23 | MLE | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
ソースコード
n=int(input()) def shift(x): return x//2+(2**15)*(x%2) a=[0]+list(map(int,input().split())) if n>=16: print(2**16-1) dp=[[0]*(2**16) for i in range(n+3)] dp[0][0]=1 for i in range(1,n+1): for j in range(2**16): for iii in range(16): dp[i][j|a[i]]|=dp[i-1][j] a[i]=shift(a[i]) for j in range(2**16-1,-1,-1): if dp[n][j]: print(j) exit()