結果
問題 |
No.2071 Shift and OR
|
ユーザー |
![]() |
提出日時 | 2022-09-22 15:45:49 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 449 bytes |
コンパイル時間 | 155 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 106,240 KB |
最終ジャッジ日時 | 2024-12-22 04:53:10 |
合計ジャッジ時間 | 5,631 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 RE * 7 |
ソースコード
import sys input=lambda:sys.stdin.readline().rstrip() unit=2.18169499062491237350 N=int(input()) A=list(map(int,input().split())) if N>15: print(2**16-1) else: pos=[i==0 for i in range(2**16)] for i in A: temp=i newpos=[i==0 for i in range(2**16)] for k in range(16): temp=(temp//2)+(2**15)*(temp%2) for j in range(2**16): if pos[j]: newpos[j|temp]=1 pos=newpos for i in range(2**16-1,-1,-1): if pos[i]: print(i) break