結果

問題 No.130 XOR Minimax
ユーザー NoneNone
提出日時 2021-03-24 22:54:14
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 219 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 213,184 KB
最終ジャッジ日時 2023-08-17 22:39:07
合計ジャッジ時間 5,249 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 76 ms
71,160 KB
testcase_02 AC 74 ms
71,364 KB
testcase_03 AC 71 ms
71,260 KB
testcase_04 AC 91 ms
88,768 KB
testcase_05 AC 226 ms
206,780 KB
testcase_06 AC 187 ms
158,552 KB
testcase_07 WA -
testcase_08 AC 235 ms
207,380 KB
testcase_09 AC 94 ms
77,412 KB
testcase_10 AC 96 ms
83,532 KB
testcase_11 WA -
testcase_12 AC 86 ms
76,532 KB
testcase_13 AC 137 ms
121,620 KB
testcase_14 AC 208 ms
189,292 KB
testcase_15 AC 79 ms
76,472 KB
testcase_16 AC 164 ms
149,152 KB
testcase_17 AC 166 ms
149,344 KB
testcase_18 AC 178 ms
156,972 KB
testcase_19 AC 194 ms
170,484 KB
testcase_20 AC 130 ms
113,564 KB
testcase_21 AC 208 ms
189,036 KB
testcase_22 WA -
testcase_23 AC 86 ms
77,092 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int, input().split()))
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
print(M)
0