結果

問題 No.2071 Shift and OR
ユーザー ytftytft
提出日時 2022-09-22 15:45:49
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 449 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 87,372 KB
実行使用メモリ 107,280 KB
最終ジャッジ日時 2023-08-23 20:33:39
合計ジャッジ時間 7,588 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
77,756 KB
testcase_01 AC 87 ms
78,432 KB
testcase_02 AC 95 ms
79,168 KB
testcase_03 AC 126 ms
80,212 KB
testcase_04 AC 104 ms
79,852 KB
testcase_05 AC 166 ms
81,972 KB
testcase_06 AC 113 ms
79,744 KB
testcase_07 AC 98 ms
79,224 KB
testcase_08 AC 103 ms
79,696 KB
testcase_09 AC 106 ms
79,808 KB
testcase_10 AC 110 ms
79,796 KB
testcase_11 AC 169 ms
82,444 KB
testcase_12 AC 174 ms
82,328 KB
testcase_13 AC 157 ms
81,876 KB
testcase_14 AC 79 ms
76,808 KB
testcase_15 AC 142 ms
80,756 KB
testcase_16 AC 139 ms
80,768 KB
testcase_17 AC 178 ms
82,388 KB
testcase_18 AC 88 ms
78,432 KB
testcase_19 AC 203 ms
82,996 KB
testcase_20 AC 196 ms
82,844 KB
testcase_21 AC 234 ms
84,848 KB
testcase_22 AC 210 ms
83,420 KB
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 AC 132 ms
80,204 KB
testcase_31 AC 108 ms
80,252 KB
testcase_32 AC 108 ms
80,264 KB
testcase_33 AC 110 ms
80,360 KB
testcase_34 AC 115 ms
80,448 KB
testcase_35 AC 116 ms
80,372 KB
testcase_36 AC 124 ms
80,268 KB
testcase_37 AC 113 ms
80,376 KB
testcase_38 AC 111 ms
80,248 KB
testcase_39 AC 111 ms
80,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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
0