結果

問題 No.130 XOR Minimax
ユーザー NoneNone
提出日時 2021-03-24 22:51:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 213 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 87,004 KB
実行使用メモリ 207,056 KB
最終ジャッジ日時 2023-08-17 22:38:50
合計ジャッジ時間 5,561 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 69 ms
71,212 KB
testcase_02 AC 71 ms
71,316 KB
testcase_03 AC 70 ms
71,132 KB
testcase_04 AC 87 ms
88,488 KB
testcase_05 AC 224 ms
207,056 KB
testcase_06 AC 180 ms
158,324 KB
testcase_07 WA -
testcase_08 AC 224 ms
206,944 KB
testcase_09 AC 87 ms
77,316 KB
testcase_10 AC 93 ms
83,440 KB
testcase_11 AC 158 ms
141,872 KB
testcase_12 WA -
testcase_13 AC 135 ms
121,556 KB
testcase_14 AC 203 ms
189,024 KB
testcase_15 AC 75 ms
76,136 KB
testcase_16 AC 156 ms
148,748 KB
testcase_17 AC 157 ms
149,316 KB
testcase_18 WA -
testcase_19 AC 184 ms
174,752 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 87 ms
79,944 KB
testcase_23 AC 79 ms
76,976 KB
権限があれば一括ダウンロードができます

ソースコード

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