結果
| 問題 |
No.130 XOR Minimax
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-24 23:01:25 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 404 bytes |
| コンパイル時間 | 270 ms |
| コンパイル使用メモリ | 82,068 KB |
| 実行使用メモリ | 207,228 KB |
| 最終ジャッジ日時 | 2024-11-26 23:31:23 |
| 合計ジャッジ時間 | 4,087 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 WA * 7 |
ソースコード
N=int(input())
A=list(map(int, input().split()))
A0=A[:]
M=max(A)
L=M.bit_length()
for i in range(L)[::-1]:
B=[]
for a in A:
B.append(a^(1<<i))
temp=max(B)
if temp<=M:
M=temp
A=B
if A==A0:
M=10**18
for i in range(L)[::-1]:
B=[]
for a in A0:
B.append(a^(1<<i))
temp=max(B)
if temp<=M:
M=temp
print(M)