結果

問題 No.130 XOR Minimax
ユーザー roiti46roiti46
提出日時 2015-02-25 16:44:50
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 215 bytes
コンパイル時間 75 ms
コンパイル使用メモリ 6,780 KB
実行使用メモリ 14,656 KB
最終ジャッジ日時 2023-09-06 04:32:04
合計ジャッジ時間 5,869 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 11 ms
5,852 KB
testcase_02 AC 11 ms
5,848 KB
testcase_03 AC 11 ms
5,920 KB
testcase_04 AC 273 ms
7,356 KB
testcase_05 AC 379 ms
14,636 KB
testcase_06 AC 285 ms
14,452 KB
testcase_07 WA -
testcase_08 AC 337 ms
14,476 KB
testcase_09 AC 51 ms
7,116 KB
testcase_10 AC 72 ms
7,752 KB
testcase_11 AC 247 ms
13,148 KB
testcase_12 WA -
testcase_13 AC 192 ms
11,452 KB
testcase_14 AC 291 ms
13,148 KB
testcase_15 AC 14 ms
6,052 KB
testcase_16 AC 207 ms
10,800 KB
testcase_17 AC 191 ms
11,036 KB
testcase_18 WA -
testcase_19 AC 263 ms
12,640 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 67 ms
7,180 KB
testcase_23 AC 27 ms
6,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(raw_input())
a = map(int,raw_input().split())
mn = max(a)
x = 0
for i in xrange(31):
    xx = x | (1 << i)
    if max(ai^xx for ai in a) < mn:
        mn = max(ai^xx for ai in a)
        x = xx
print mn
    
0