結果
| 問題 | No.2071 Shift and OR |
| コンテスト | |
| ユーザー |
ytft
|
| 提出日時 | 2022-09-22 15:45:49 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 449 bytes |
| 記録 | |
| コンパイル時間 | 165 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 109,568 KB |
| 最終ジャッジ日時 | 2026-05-28 14:07:21 |
| 合計ジャッジ時間 | 4,337 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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
ytft