結果

問題 No.130 XOR Minimax
ユーザー None
提出日時 2021-03-24 22:51:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 213 bytes
コンパイル時間 250 ms
コンパイル使用メモリ 82,384 KB
実行使用メモリ 206,572 KB
最終ジャッジ日時 2024-11-26 23:30:54
合計ジャッジ時間 4,661 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int, input().split()))
M=max(A)
L=M.bit_length()
for i in range(L):
    B=[]
    for a in A:
        B.append(a^(1<<i))
    temp=max(B)
    if temp<=M:
        M=temp
        A=B
print(M)
0