結果

問題 No.130 XOR Minimax
ユーザー NoneNone
提出日時 2021-03-24 22:51:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 213 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 206,632 KB
最終ジャッジ日時 2024-05-05 05:26:13
合計ジャッジ時間 4,132 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 36 ms
51,712 KB
testcase_02 AC 35 ms
52,224 KB
testcase_03 AC 38 ms
51,712 KB
testcase_04 AC 54 ms
76,672 KB
testcase_05 AC 193 ms
206,108 KB
testcase_06 AC 149 ms
145,036 KB
testcase_07 WA -
testcase_08 AC 207 ms
205,868 KB
testcase_09 AC 62 ms
76,032 KB
testcase_10 AC 66 ms
82,816 KB
testcase_11 AC 128 ms
130,076 KB
testcase_12 WA -
testcase_13 AC 107 ms
116,096 KB
testcase_14 AC 180 ms
188,296 KB
testcase_15 AC 44 ms
60,032 KB
testcase_16 AC 136 ms
148,020 KB
testcase_17 AC 136 ms
147,916 KB
testcase_18 WA -
testcase_19 AC 160 ms
173,456 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 67 ms
79,360 KB
testcase_23 AC 56 ms
72,704 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